July 2018
Beginner
202 pages
5h 42m
English
Lua does not officially support exceptions. But, a similar mechanism can be built with pcalls, or protected calls. An exception halts the flow of code in case of an error, and returns control to the caller right away. Furthermore, some kind of error code is likely provided to the caller. This method of raising errors immediately should, in theory, allow callers to handle unsafe code gracefully.