Add new standard Exceptions, allow user code to throw them
960
Views
2
Comments
On our RadarOn our Radar
Backend
We keep re-making the same Exceptions over and over again. It would be great if these were built into the system and user code could raise them:

* Validation Exception
* Processing Exception (a generic "something has gone wrong")
* Web Service Exception (for when something goers wrong with a Web Service)
* Extension Exception (for wrapping around errors coming from Extensions)
* Not Implemented Exception (we use this when a Switch is looking at a Static Entity value and there are values that should never be chosen like inactive values and as a "fail fast, fail hard" when we add a new value but haven't coded all the paths for dealing with it)

J.Ja

To the list above I would like to add a 'Timeout Exception' with child exceptions for the various different timeouts that can occur.

Cheers, Richard.

+1

But I think, making user exceptions public would alleviate this.

Making the definitive list of standard exceptions managed by OS, doesn't appeal to me.  So let each client come up with their own set of 'common' exceptions and have a producer module for all developers on their projects to use.

And OS (or anyone else) could make a Forge component with their suggestion of 'standard' exceptions.