• Skip to primary navigation
  • Skip to content
  • Skip to footer
Dave Clare
  • Posts
  • Categories
  • Tags
  • Brag
  • About
    Dave Clare

    Dave Clare

    Software Engineer

    • GitHub
    • LinkedIn

    try catch

    less than 1 minute read

    Try and Catch with Typescript

    try {
       // Do something that could throw an error
    } catch(error) {
      if (error instanceof Error) {
        // Do something. E.g.
        console.log(error.message)
      }
    }
    

    Tags: code, snippet, typescript

    Categories: Code

    Updated: October 5, 2023

    Share on

    X Facebook LinkedIn Bluesky
    Previous Next

    You May Also Enjoy

    Delivering Features

    2 minute read

    Feature Delivery in Flow State

    Working with Reality: A Different Approach to Software Development

    8 minute read

    Introduction

    ‘Feature to Delivery’ Framework

    5 minute read

    I was asked in an interview to explain how I go about planning features/work.

    Pamphlet

    9 minute read

    The Pragmatist’s Manifesto: A Developer’s Guide to Building Things That Actually Matter

    • GitHub
    • LinkedIn
    • Feed
    © 2025 Dave Clare. Powered by Jekyll & Minimal Mistakes.