The [handle_failure] container executes it's nested code upon a fail condition of the parent [protect] code block.
All [handle] and [handle_failure] containers must immediately follow the start of the parent [protect] block. This is a change from previous versions of Lasso and increases the reliability of executing fault-condition fallbacks.
protect => {
handle_failure => { ... code to execute on failure ... }
...
}
Use the [handle_failure] method.
Code
protect => {
handle_failure => {
log_critical('babyRhinos.lasso include error')
}
include('babyRhinos.lasso')
}
Result
In console or log book: [2011-06-07 09:12:35] babyRhinos.lasso include error
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft
Recent Comments