mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-04-29 22:27:33 +00:00
[Add][Fix] Framework-API 补充提交两个异常类;
[Add] NoSuchSenderException, UploadImageException 添加两个与 MessageSender 相关的异常类;
This commit is contained in:
parent
551c2097be
commit
0b6f537354
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (C) 2020 LamGC
|
||||
*
|
||||
* ContentGrabbingJi is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* ContentGrabbingJi is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.lamgc.cgj.bot.framework.message.exception;
|
||||
|
||||
/**
|
||||
* 无对应 Sender 异常.
|
||||
* 当 {@link net.lamgc.cgj.bot.framework.message.MessageSenderFactory} 无法返回对应 Sender 时抛出.
|
||||
* @see net.lamgc.cgj.bot.framework.message.MessageSender
|
||||
* @see net.lamgc.cgj.bot.framework.message.MessageSenderFactory
|
||||
* @author LamGC
|
||||
*/
|
||||
public class NoSuchSenderException extends Exception {
|
||||
|
||||
public NoSuchSenderException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public NoSuchSenderException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public NoSuchSenderException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (C) 2020 LamGC
|
||||
*
|
||||
* ContentGrabbingJi is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* ContentGrabbingJi is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.lamgc.cgj.bot.framework.message.exception;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* 图片上传异常.
|
||||
* 当图片上传发生异常时抛出, 需附带原因.
|
||||
* @author LamGC
|
||||
* @see net.lamgc.cgj.bot.framework.message.MessageSender
|
||||
* @see net.lamgc.cgj.bot.framework.message.MessageSender#uploadImage(File)
|
||||
* @see net.lamgc.cgj.bot.framework.message.MessageSender#uploadImage(java.io.InputStream)
|
||||
*/
|
||||
public class UploadImageException extends Exception {
|
||||
|
||||
public UploadImageException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public UploadImageException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public UploadImageException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user