package org.springblade.modules.exception;


import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * 全局异常处理
 *
 * @author LHB
 */
@RestControllerAdvice
public class GlobalException {
    @ExceptionHandler(value = {Exception.class})
    public R ex(Exception e) {
        return R.fail(e.getMessage());
    }
}
