Ticker

6/recent/ticker-posts

Ad Code

Responsive Advertisement

异步方法抛异常无法抛出也无法捕获

    if (CollectionUtils.isEmpty(validUser)){
        throw new BaseException(ErrorResultEnum.MSG_SEND_LIMIT);
    }

BaseException是自定义异常,这个判断语句包含在一个异步方法里。每次运行到这里抛出异常的时候就报下面这个错。请问为什么?我应该怎么改?
这个异步方法是一个具有 void 返回类型的方法。

[ERROR] [37] [threadpool-2] o.s.a.i.SimpleAsyncUncaughtExceptionHandler - Unexpected error occurred invoking async method 'public void org.notification.im.service.impl.ImServiceImpl.sendFansMessage(org.notification.common.vo.im.SendImFansParam)'. 
org.notification.common.exception.BaseException: null

Enregistrer un commentaire

0 Commentaires