trapping errors from a sub call

I want to trap any errors from a backup database script and send an email when an error occurs. I can trap command errors and send an email in the following code. My problem occurs if an error occurs in the Maxl script, /opt/hyperion/AnalyticServices/bin/essmsh < MaxlScript.msh..., that is called to back up the database. Is there a way I can trap an error that is returned from the Maxl script.

#!/usr/bin/ksh -v
error_message()
{
   mailx -s "Essbase backup error" email user Id.  < BackupError.txt
}
trap 'error_message' ERR
set -e
cd /opt/hyperion/HYP_BACKUP/scripts
/opt/hyperion/AnalyticServices/bin/essmsh < /opt/staff/srv-plan9/MaxlScript.msh > /opt/staff/srv-plan9/Maxl.log 2>$1
exit

Thanks,
Tom