Created the protected_exec() function for catching RelaxErrors.
This function applies a given function, displays a dialog if a RelaxError occurs, and returns the status of execution.
Authored by: bugman 2011-07-13
Parent: [r13569]
Child: [r13571]