Lua primitives: on_error()
If you define the function on_idle it will be called whenever there is an error encountered in Lua code.
scroll_maildir_to( false );
In that situation the argument type wouldn't match the expectations of the function, and an error should be raised.
The standard configuration file contains a simple handler which will alert the user to errors when running in debug-mode only:
-- -- Here we display the error to the user, but only in debug-builds. -- -- function on_error( text ) if ( DEBUG == true ) then msg( text ) end end
This function has been available since version 0.26.