LightnCandy\Runtime::err PHP Method

err() public static method

Handle error by error_log or throw exception.
public static err ( array\arraystring | integer> $cx, string $err )
$cx array\arraystring | integer>
$err string error message
    public static function err($cx, $err)
    {
        if ($cx['flags']['debug'] & static::DEBUG_ERROR_LOG) {
            error_log($err);
            return;
        }
        if ($cx['flags']['debug'] & static::DEBUG_ERROR_EXCEPTION) {
            throw new \Exception($err);
        }
    }