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

Error Handling 4

  • Returning a value is similar, but to extract the value we need to make a test. Let’s first look at a simple function illustrating the use.
  • Both divide_int(4, 2) and divide_int(4, 0) would give us an int! result, so how do we decide what we got? We use if-catch or if-try.