16 lines
461 B
Java
16 lines
461 B
Java
package com.bwie.common.exception;
|
|
|
|
import com.bwie.common.result.Result;
|
|
import lombok.extern.log4j.Log4j2;
|
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
|
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
|
|
|
@Log4j2
|
|
@RestControllerAdvice
|
|
public class AllExceptionHandler {
|
|
@ExceptionHandler(AbnormalException.class)
|
|
public Result RunExceptionHandler(Throwable e){
|
|
return Result.error(e.getMessage());
|
|
}
|
|
}
|