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); } }