Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there anything like .NET's NotImplementedException in Java?

Is there anything like .NET's NotImplementedException in Java?

like image 887
devoured elysium Avatar asked Feb 24 '10 20:02

devoured elysium


People also ask

What is Java Lang UnsupportedOperationException?

An UnsupportedOperationException is a runtime exception in Java that occurs when a requested operation is not supported. For example, if an unmodifiable List is attempted to be modified by adding or removing elements, an UnsupportedOperationException is thrown.

How do you handle NotImplementedException?

The NotImplementedException exception indicates that the method or property that you are attempting to invoke has no implementation and therefore provides no functionality. As a result, you should not handle this error in a try/catch block. Instead, you should remove the member invocation from your code.


2 Answers

Commons Lang has it. Or you could throw an UnsupportedOperationException.

like image 72
Ravi Wallau Avatar answered Oct 07 '22 01:10

Ravi Wallau


I think the java.lang.UnsupportedOperationException is what you are looking for.

like image 31
Chris Dail Avatar answered Oct 07 '22 01:10

Chris Dail