Since $errorsMsg is declared private, accessing it with static will lead to errors in possible sub-classes; you can either use self, or increase the visibility of $errorsMsg to at least protected.
Loading history...
33
}
34
35
/**
36
* Throw new exception
37
*
38
* @param int $code
39
* @param string|null $msg
40
*
41
* @throws CseExceptions
42
*/
43
public static function throwException(int $code, ?string $msg = ''): void
44
{
45
throw new static(static::getErrorMsg($code) . (empty($msg) ? '' : $msg), $code);