经常看到,但是不理解什么意思
比如这个:
2017-10-20 11:38:11,211 ERROR - Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer'; nested exception is java.lang.NumberFormatException: For input string: "x" [com.eversec.centertool.exception.GlobalControllerExceptionHandler.handleException(GlobalControllerExceptionHandler.java:37)] org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer'; nested exception is java.lang.NumberFormatException: For input string: "x"
有两个异常 NumberFormatException 和 MethodArgumentTypeMismatchException 如果我写一个捕捉语句 对两个异常都捕捉 哪个会优先被捕捉?