November 2017
Beginner
316 pages
6h 40m
English
The most important part of exception handling is to take care using these statements. They not only provide effective safety from unknown errors, but also increase control over the code from the developer's perspective. In other words, all well-written code, if possible, must include try/catch blocks:
julia> try exponent("alpha") catch(e) println(e) endMethodError(exponent, ("alpha",), 0x00000000000055aa)
We already know that exponent doesn't work over String-type values; however, in this example, we tried to evaluate it firsthand inside the try block, and failing that, catch will catch and hold the exception as e.
In the end, we can see that there was an MethodError exception raised by the code, which was then ...
Read now
Unlock full access