Should use throw new CRM_Core_Exception for new errors - I spoke with @totten & he has not felt brave enough to retrospectively remove CRM_Core_Error::fatal but is advocating the exception method I believe.

Also, whitespace std should be 
}
else {

I found that one pretty wierd too but bgm explained that it is because it leads to cleaner patches