Java equivalent to .Net's NotSupportedException

后端 未结 2 623
夕颜
夕颜 2021-02-06 20:10

Is there (not NotImplementedException, not supported).

相关标签:
2条回答
  • 2021-02-06 20:54

    You can use either UnsupportedOperationException or NoSuchMethodException or extend the Exception class and create your own custom exception called NotImplementedException or whatever

    0 讨论(0)
  • 2021-02-06 20:59

    java.lang.UnsupportedOperationException

    Or, if you use Apache Commons Lang and the operation should be supported, but has not been implemented (yet?):

    org.apache.commons.lang.NotImplementedException

    0 讨论(0)
提交回复
热议问题