Page 1 of 1

Throw Exception Service

Posted: June 27th, 2022, 6:56 pm
by JefferyD
At times I have encountered scenarios where it's easy to determine that something went wrong but handling it requires several layers of error handling logic. Most of those scenarios, I just want to terminate the current method flow and tell the user that something went wrong, but that gets increasingly more complicated and difficult as more layers of methods are needed.

Suggestion
For situations like that, it would be helpful if there was a service that could throw a simulated exception with a custom message. Being able to throw an exception on command would greatly help to prevent error handling gaps from running logic that should be ignored. Additionally, it means that some error handling can defer to the built-in exception handling of EASYProcess which could help reduce the overall complexity and potential failure points of the overall logic as well.

For simple scenarios, this may not be that useful, but I believe it could be invaluable as scenarios get more and more complicated.

Re: Throw Exception Service

Posted: June 29th, 2022, 8:53 am
by SteveCap
Task #10574 has been created. This post will be updated when the service has been completed.

Re: Throw Exception Service

Posted: May 2nd, 2023, 11:47 am
by CathyC
The previous task was closed to consolidate with a newer task with more info
Task #11294