Exception Declaration Convention

In a Catch statement I often try to catch specific types of exceptions and then a generic exception.

The generic is

catch ex as Exception


catch hEx as HTTPException

But a SQL

catch exS as SQLException

Isn’t that silly, that I can’t bring myself to follow the convention for SQLExceptions?

  Sign up for my newsletter so you don't miss my conference & Pluralsight course announcements!  

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.