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)anddivide_int(4, 0)would give us anint!result, so how do we decide what we got? We useif-catchorif-try.