set("hauth_session.error.status", 1); Hybrid_Auth::storage()->set("hauth_session.error.message", $message); Hybrid_Auth::storage()->set("hauth_session.error.code", $code); Hybrid_Auth::storage()->set("hauth_session.error.trace", $trace); Hybrid_Auth::storage()->set("hauth_session.error.previous", $previous); } /** * Clear the last error * @return void */ public static function clearError() { Hybrid_Logger::info("Enter Hybrid_Error::clearError()"); Hybrid_Auth::storage()->delete("hauth_session.error.status"); Hybrid_Auth::storage()->delete("hauth_session.error.message"); Hybrid_Auth::storage()->delete("hauth_session.error.code"); Hybrid_Auth::storage()->delete("hauth_session.error.trace"); Hybrid_Auth::storage()->delete("hauth_session.error.previous"); } /** * Checks to see if there is a an error. * @return boolean true if there is an error. */ public static function hasError() { return (bool) Hybrid_Auth::storage()->get("hauth_session.error.status"); } /** * Return error message * @return string */ public static function getErrorMessage() { return Hybrid_Auth::storage()->get("hauth_session.error.message"); } /** * Return error code * @return int */ public static function getErrorCode() { return Hybrid_Auth::storage()->get("hauth_session.error.code"); } /** * Return string detailed error backtrace as string * @return string */ public static function getErrorTrace() { return Hybrid_Auth::storage()->get("hauth_session.error.trace"); } /** * Detailed error backtrace as string * @return string */ public static function getErrorPrevious() { return Hybrid_Auth::storage()->get("hauth_session.error.previous"); } }