Exemple #1
0
        /// <summary>
        /// Returns and clears the last StageBitz exception that occured in StageBitz system.
        /// </summary>
        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);
        }
Exemple #2
0
 public static void ThrowException(StageBitzException ex)
 {
     HttpContext.Current.Session["LastException"] = ex;
     throw ex;
 }