byrokrat / giroapp

Command line app for managing autogiro donations.
GNU General Public License v3.0
4 stars 2 forks source link

Create custom exceptions instead of relying on RuntimeException #102

Closed hanneskod closed 5 years ago

hanneskod commented 7 years ago

Let's be more informative in general. For example

UnableToBuildDonorException extends \LogicException
{
}

Work through src...

And when exceptions are caught in CommanWrapper differentiate between

hanneskod commented 7 years ago

Also let giroapp exceptions carry an error code to be written to the event context in ErrorEvent.

Can be used to set the return code of the application.

Good for scripting. And really good for the feature tests, as expected errors can be validated..

hanneskod commented 5 years ago

How often do we dispatch error or warning events and expect execution to continue (and want an error return code)? Related to the need to keep return status listener..