Coffeehouse Post

Single Post Permalink

View Thread: Useful general development tips ...
  • User profile image


    Corollary: try { } catch ( Exception ex ) { /* no rethrow */ } anywhere other than at the root of a thread or the program doing anything other than logging the exception and exiting might sound like you're being kind to your customers, but in reality you're just being unkind to your developers

    That construct can allow you to continue over an exception that you shouldn't be continuing from, and will end up having corrupted a whole load of internal state making your life waaay harder when you come to debug.

    Design your APIs so that you know what exceptions they might spit out, and capture only the ones you know you can continue from!