Exemplo n.º 1
0
        public static void WriteException(string errorType, Page pageName, HttpContext context , Exception exceptionMessage)
        {
            LINQ_WebsiteDataContext db = new LINQ_WebsiteDataContext();
            try
            {
                string errorDescription = "";
                string exceptionMsg = exceptionMessage.ToString();
                //TODO set error level based on exception keyword or sql error level
                int? errorLevel = 0;
                string pn = "";
                int webUser = (int)context.Session["userid"];
                string browserName = GetBrowserName(context.Request.UserAgent.ToString());
                pn = pageName.ToString();
                db.WriteError(webUser, pn, exceptionMsg, errorDescription, errorType, errorLevel, browserName);

            }
            catch(Exception ex)
            {
                EmailError(ex);
            }
        }
Exemplo n.º 2
0
 public static void WriteException(string errorType, int uid, string classname, Exception exceptionMessage)
 {
     LINQ_WebsiteDataContext db = new LINQ_WebsiteDataContext();
     try
     {
         string errorDescription = "";
         string exceptionMsg = exceptionMessage.ToString();
         //TODO set error level based on exception keyword or sql error level
         int? errorLevel = 0;
         string pn = "";
         string browserName = "";
         pn = classname;
         db.WriteError(uid, pn, exceptionMsg, errorDescription, errorType, errorLevel, browserName);
     }
     catch (Exception ex)
     {
         EmailError(ex);
     }
 }