I'd just chain this as `JFactory::getApplication()->enqueueMessage($e->getMessage());`.  No need to get the app as a variable for this one line.