コード例 #1
0
ファイル: Database.cs プロジェクト: dhuyvaert/Sam_Solution
        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);
            }
        }
コード例 #2
0
ファイル: Database.cs プロジェクト: dhuyvaert/Sam_Solution
 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);
     }
 }