Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f90bd193d9 |
@@ -96,7 +96,7 @@ final class CoreLibsLoggingErrorMessagesTest extends TestCase
|
|||||||
'log_level' => Level::Debug,
|
'log_level' => Level::Debug,
|
||||||
]);
|
]);
|
||||||
$em = new \CoreLibs\Logging\ErrorMessage($log);
|
$em = new \CoreLibs\Logging\ErrorMessage($log);
|
||||||
$em->setError(
|
$em->setMessage(
|
||||||
$level,
|
$level,
|
||||||
$str
|
$str
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -109,35 +109,8 @@ class ErrorMessage
|
|||||||
* highlight points for field highlights
|
* highlight points for field highlights
|
||||||
* @param string|null $message If abort/crash, non localized $str
|
* @param string|null $message If abort/crash, non localized $str
|
||||||
* @param array<mixed> $context Additionl info for abort/crash messages
|
* @param array<mixed> $context Additionl info for abort/crash messages
|
||||||
* @deprecated 9.7 Use setError instead
|
|
||||||
*/
|
*/
|
||||||
public function setErrorMsgLevel(
|
public function setMessage(
|
||||||
string $level,
|
|
||||||
string $str,
|
|
||||||
?string $error_id = null,
|
|
||||||
string $target = '',
|
|
||||||
array $highlight = [],
|
|
||||||
?string $message = null,
|
|
||||||
array $context = [],
|
|
||||||
): void {
|
|
||||||
$this->setErrorMsg($error_id ?? '', $level, $str, $target, $highlight, $message, $context);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* pushes new error message into the error_str array
|
|
||||||
* Note, the parameter order is different and does not need an error id
|
|
||||||
* This is for backend alerts
|
|
||||||
*
|
|
||||||
* @param string $level error level (ok/warn/info/error)
|
|
||||||
* @param string $str error string
|
|
||||||
* @param string|null $error_id optional error id for precise error lookup
|
|
||||||
* @param string $target Alternate id name for output target on frontend
|
|
||||||
* @param array<string> $highlight Any additional error data as error OR
|
|
||||||
* highlight points for field highlights
|
|
||||||
* @param string|null $message If abort/crash, non localized $str
|
|
||||||
* @param array<mixed> $context Additionl info for abort/crash messages
|
|
||||||
*/
|
|
||||||
public function setError(
|
|
||||||
string $level,
|
string $level,
|
||||||
string $str,
|
string $str,
|
||||||
?string $error_id = null,
|
?string $error_id = null,
|
||||||
|
|||||||
Reference in New Issue
Block a user