优化异常提示
This commit is contained in:
laoyuyu
2020-02-06 22:22:10 +08:00
parent 96efa35c4e
commit e015c2a2f7
55 changed files with 324 additions and 523 deletions

View File

@@ -15,14 +15,22 @@
*/
package com.arialyy.aria.exception;
public class AriaException extends BaseException {
private static final String ARIA_NET_EXCEPTION = "Aria Exception:";
public class AriaException extends Exception {
private String tag;
public AriaException(String tag, String message) {
super(tag, String.format("%s%s", ARIA_NET_EXCEPTION, message));
super(message);
this.tag = tag;
}
public AriaException(String tag, String message, Exception e) {
super(tag, message, e);
super(String.format("%s, %s\n%s", tag, message == null ? "" : message,
e == null ? "" : e.getMessage()));
this.tag = tag;
}
public String getTag() {
return tag;
}
}