C3 Tutorial
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Error Handling 5

  • The downside of if try is that it usually puts the main code inside of a block.
  • We can instead use if catch which instead executes on an optional to get the error. And if there is a return from this if then the variable will be considered checked to be a real type.