Class NotImplementedException

  • All Implemented Interfaces:
    java.io.Serializable

    public class NotImplementedException
    extends java.lang.UnsupportedOperationException

    Thrown to indicate that a block of code has not been implemented. This exception supplements UnsupportedOperationException by providing a more semantically rich description of the problem.

    NotImplementedException represents the case where the author has yet to implement the logic at this point in the program. This can act as an exception based TODO tag.

     public void foo() {
            try {
                    // do something that throws an Exception
            } catch (Exception ex) {
                    // don't know what to do here yet
                    throw new NotImplementedException("TODO", ex);
            }
     }
     
    This class was originally added in Lang 2.0, but removed in 3.0.
    Since:
    3.2
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getCode()
      Obtain the not implemented code.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • NotImplementedException

        public NotImplementedException()
        Constructs a NotImplementedException.
        Since:
        3.10
      • NotImplementedException

        public NotImplementedException​(java.lang.String message)
        Constructs a NotImplementedException.
        Parameters:
        message - description of the exception
        Since:
        3.2
      • NotImplementedException

        public NotImplementedException​(java.lang.Throwable cause)
        Constructs a NotImplementedException.
        Parameters:
        cause - cause of the exception
        Since:
        3.2
      • NotImplementedException

        public NotImplementedException​(java.lang.String message,
                                       java.lang.Throwable cause)
        Constructs a NotImplementedException.
        Parameters:
        message - description of the exception
        cause - cause of the exception
        Since:
        3.2
      • NotImplementedException

        public NotImplementedException​(java.lang.String message,
                                       java.lang.String code)
        Constructs a NotImplementedException.
        Parameters:
        message - description of the exception
        code - code indicating a resource for more information regarding the lack of implementation
        Since:
        3.2
      • NotImplementedException

        public NotImplementedException​(java.lang.Throwable cause,
                                       java.lang.String code)
        Constructs a NotImplementedException.
        Parameters:
        cause - cause of the exception
        code - code indicating a resource for more information regarding the lack of implementation
        Since:
        3.2
      • NotImplementedException

        public NotImplementedException​(java.lang.String message,
                                       java.lang.Throwable cause,
                                       java.lang.String code)
        Constructs a NotImplementedException.
        Parameters:
        message - description of the exception
        cause - cause of the exception
        code - code indicating a resource for more information regarding the lack of implementation
        Since:
        3.2
    • Method Detail

      • getCode

        public java.lang.String getCode()
        Obtain the not implemented code. This is an unformatted piece of text intended to point to further information regarding the lack of implementation. It might, for example, be an issue tracker ID or a URL.
        Returns:
        a code indicating a resource for more information regarding the lack of implementation