withCode method

ApplicationException withCode(
  1. String code
)

Sets a unique error code.

This method returns reference to this exception to implement Builder pattern to chain additional calls.

  • code a unique error code Returns this exception object

Implementation

ApplicationException withCode(String code) {
  this.code = code;
  return this;
}