异常处理服务,用于异常消息的集中处理与分发
| Modifiers | Name | Description |
|---|---|---|
static class |
ErrorService.DummyException |
虚拟异常 |
| Modifiers | Name | Description |
|---|---|---|
static Integer |
aliasOverridingOrder |
| Type | Name and description |
|---|---|
AuditlogService |
auditlogService |
SettingService |
settingService |
grails.plugin.springsecurity.SpringSecurityService |
springSecurityService |
Thread$UncaughtExceptionHandler |
threadDefaltExceptionHandler线程的默认异常处理对象 |
Thread$UncaughtExceptionHandler |
threadExceptionHandler如果默认异常处理对象被覆盖,则可以采用本异常处理对象,但是需要写代码来设置 |
| Type | Name and description |
|---|---|
void |
bootStrapInit()初始化 |
static void |
doWithDynamicMethods() |
static String |
getErrorId(Throwable e) |
void |
notifyAdmin(String message, Throwable e)发送执行异常的邮件,通知管理员 |
void |
push(Throwable e)推送一个异常 |
void |
push(String message, Throwable e)推送一个异常 |
void |
push(String msgCode, Throwable e, List<Object> msgArgs, String defaultMsg = null)推送一个异常 |
void |
push(String message) |
void |
push(String msgCode, List<Object> msgArgs, String defaultMsg = null) |
void |
pushWithoutNotify(Throwable e)推送一个异常,但是无需通知管理员或打印消息 |
void |
sendAsynchronousMail(String mailsTo, String mailSubject, Object mailBody) |
static void |
setErrorId(Throwable e, String eid) |
| Methods inherited from class | Name |
|---|---|
class Object |
Object#wait(long, int), Object#wait(long), Object#wait(), Object#equals(Object), Object#toString(), Object#hashCode(), Object#getClass(), Object#notify(), Object#notifyAll() |
线程的默认异常处理对象
如果默认异常处理对象被覆盖,则可以采用本异常处理对象,但是需要写代码来设置
初始化
发送执行异常的邮件,通知管理员
message - 消息,会用来作为邮件标题e - 异常对象推送一个异常
推送一个异常
推送一个异常
推送一个异常,但是无需通知管理员或打印消息