withCause method

ApplicationException withCause (
  1. dynamic cause
)

Sets a original error wrapped by this exception

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

  • cause original error object Returns this exception object