lide.error¶
[lide.core] ^0.01This module is loaded with
lide.coreit’s part of framework into thelide.errormodule we will find the necessary functions to robust error handling implemented in Lua.local try, catch = lide.error.try, lide.error.catch; try { function( ) ... end, catch { function( err ) print(err); end }};
lide.error.try¶
Within this function we will put the piece of code that could have an error.
| nil | lide.error.try ( function try_code ) |
lide.error.catch¶
OptionalWithin this function we will put the code that will be executed in case of error.
| nil | lide.error.catch ( function catch_code ( Exception exception ) ) |
lide.error.finally¶
OptionalHere we should put cleaning code
| nil | lide.error.finally ( function finally_code ) |
lide.error.newException¶
Create an exception
| Exception | lide.error.newException ( string sExceptionName, string sDefaultErrMsg ) |