On this page

NotImplementedException

public class org.apache.commons.lang3.NotImplementedException extends UnsupportedOperationException[source]

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

Constructors

NotImplementedException()

Constructs a NotImplementedException.

NotImplementedException(String)

Constructs a NotImplementedException.

NotImplementedException(String, String)

Constructs a NotImplementedException.

NotImplementedException(String, Throwable)

Constructs a NotImplementedException.

NotImplementedException(String, Throwable, String)

Constructs a NotImplementedException.

NotImplementedException(Throwable)

Constructs a NotImplementedException.

NotImplementedException(Throwable, String)

Constructs a NotImplementedException.

public NotImplementedException()[source]

Constructs a NotImplementedException.

Since:

3.10

public NotImplementedException(String message)[source]

Constructs a NotImplementedException.

Parameters:

message – description of the exception

Since:

3.2

public NotImplementedException(String message, String code)[source]

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

public NotImplementedException(String message, Throwable cause)[source]

Constructs a NotImplementedException.

Parameters:
  • message – description of the exception

  • cause – cause of the exception

Since:

3.2

public NotImplementedException(String message, Throwable cause, String code)[source]

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

public NotImplementedException(Throwable cause)[source]

Constructs a NotImplementedException.

Parameters:

cause – cause of the exception

Since:

3.2

public NotImplementedException(Throwable cause, String code)[source]

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

Methods

getCode()

Gets the code identifying why this operation is not implemented.

public String getCode()[source]

Gets the code identifying why this operation is not implemented. This unformatted text can point to further information, such as an issue tracker ID or a URL.

Returns:

A code indicating a resource for more information regarding the lack of implementation