withDetails method
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 namevalue
a details parameter name Returns this exception object
Implementation
ApplicationException withDetails(String key, value) {
details = details ?? StringValueMap();
details!.setAsObject(key, value);
return this;
}