捕获到的是BussinessException,但是 if(e instanceof BusinessException)为 false

controller里对serviceA包裹 try catch,如果捕获到的是BusinessException业务异常就拿到业务异常的code和info.
ServiceA里调用了ServiceB,ServiceB有抛出BusinessException业务异常.
但是controller的debug时候明明捕获的是BusinessException,但是if条件为false .
这是为什么?

img

你是把你的BusinessException做了啥丢到RuntimeException里面去了,e都指明了他是个RuntimeException,