Adds a line to the log file depending on the log level ERROR and can be used to evaluate errors in a system activity.
Parameter |
Type |
Description |
|---|---|---|
$message |
string |
Text of the log entry, which is written to the log file (/output/<activityId>.log) in the ERROR log level |
Example:
try {
// source code that throws a JobRouterException
} catch (JobRouterException $e) {
$this->error($e->getMessage());
throw new JobRouterException('An error has occurred. For further details, please refer to the log file.');
}