In CEGUI (cegui.org.uk) there is a modified version of toLua++ whichhandle exception in a user define behavior specified in the pakagefile.