Using Growl to display not just Pass/Fail, but also Error

The code below is a typical for using Growl to display autotest
notifications, but it only displays Pass/Fail. I'd like to see
notifications for Errors as well. Has anyone implemented this?