Beispiel #1
0
        /// <summary>
        /// Returns and clears the last StageBitz exception that occured in StageBitz system.
        /// </summary>
        /// <returns></returns>
        public static StageBitzException GetLastException()
        {
            if (HttpContext.Current.Session["LastException"] == null)
            {
                return(null);
            }

            StageBitzException ex = (StageBitzException)HttpContext.Current.Session["LastException"];

            HttpContext.Current.Session["LastException"] = null;

            return(ex);
        }
Beispiel #2
0
 /// <summary>
 /// Throws the exception.
 /// </summary>
 /// <param name="ex">The ex.</param>
 public static void ThrowException(StageBitzException ex)
 {
     HttpContext.Current.Session["LastException"] = ex;
     throw ex;
 }