Custom Exception class shows Unreachable catch block everytime

后端 未结 4 616
無奈伤痛
無奈伤痛 2021-01-21 11:59

I\'ve created a custom Exception class that I want to use in my application:

public class MyException extends Exception {
    private static final long serialVer         


        
4条回答
  •  执笔经年
    2021-01-21 12:50

    What the compile time error says is right "This exception is never thrown from the try statement body". You don't have anything which throws MyException

提交回复
热议问题