Error handling

Error handling

On occasions, running scripts produces errors (e.g. incorrect email address format in sendmail). In contrast to the Execution error popup, is there any way of trapping such script execution errors and reporting them in a controlled way? Other languages support 'on error' type traps; is there an equivalent in Deluge?