Skills a Bootcamp Doesn't Teach You: Part 2


ICYMI, last week I started a series on skills that a bootcamp doesn't teach you out-of-the-box. In an attempt to supplement the bootcamp student's tech education, I'm sharing some lessons I've learned in the first year or two on the job. Tip 2, without further ado...

Error handling

My bootcamp exposure to error handling could be summed up as: "Try-catch blocks? Sure, I guess you could use one of those." However, I can't stress enough the importance of learning where and how to appropriately throw or catch errors. It doesn't seem too important until you're faced with a customer with thousands of documents piling up in a system because your script blew up on a lousy null pointer.

Remedies:

  • As you build your own projects, don't just gloss over the try-catch blocks in tutorials and think to yourself, "I'll deal with that later." Learn how to properly present errors to the user and how to elegantly let a script error out.
  • Learn to write meaningful error messages and implement (when appropriate) custom exception classes. Make them meaningful not just to you, but for the developer after you.
  • Know when to throw an exception when it truly is an exception. I'll leave the explaining to the Microsoft Docs on this one...