withDetails method

ApplicationException withDetails(
  1. String key,
  2. dynamic value
)

Sets a parameter for additional error details. This details can be used to restore error description in other languages.

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

  • key a details parameter name
  • value a details parameter name Returns this exception object

Implementation

ApplicationException withDetails(String key, value) {
  details = details ?? StringValueMap();
  details!.setAsObject(key, value);
  return this;
}