Error Messages

ErrorMessage class

Helper class for using log error messages.

This documentation refers to SuiteCRM version 7.10.3 onwards

Usage

// simply add an error message
ErrorMessage::log('An error occured for some reason');

// using different error level
ErrorMessage::log('It\'s a debug message, only in debug level', 'debug');

// critical error messages can throw an exception
const OPTIONAL_EXCEPTION_CODE = 1234;
ErrorMessage::drop('Critical error occured for some reason', OPTIONAL_EXCEPTION_CODE); // throws new ErrorMessageException

Content is available under GNU Free Documentation License 1.3 or later unless otherwise noted.