DEV Community

Discussion on: Exceptions are meant to be exceptional

Collapse
 
integerman profile image
Matt Eland

I think this may be a language specific scenario. For example, .NET has a ValidationException class which is used internally for server-side issues. Client-side validation hopefully does not throw an Exception, but ValidationException is often used internally for 400 series responses instead of 500 series responses.

On the .NET side, another important note is that exceptions are not just different flow, but they're expensive operations as they require the framework to grab the full call stack, so I imagine other languages have similar cautions / limitations.

In general, understand that using exceptions adds complexity to the control flow of your application, making the application quality harder to guarantee.