public static string UcApplicationError(string userName, string pageUrl, Exception ex) { UcSystem.HandleException(ex, userName, pageUrl); string errorPath = AppHelper.GetApplicationPath("~/dirApp/error.aspx?code=0"); return(errorPath); }
protected void Page_Load(object sender, EventArgs e) { object obj = Request.QueryString["code"]; if (obj != null) { string code = Request.QueryString["code"].ToString(); //if (code != "0") //{ // string userName = this.UserName; // string pageUrl = ""; // Exception ex = new Exception("UCENTRIK Exception Code: " + code); // UcSystem.HandleException(ex, userName, pageUrl); //} //else if (code != "AJAX") //{ //} if (code != "0") { if (code != "AJAX") { string userName = this.UserName; string pageUrl = ""; Exception ex = new Exception("UCENTRIK Exception Code: " + code); UcSystem.HandleException(ex, userName, pageUrl); } } //lblCode.Text = code; } else { //lblCode.Text = "UNKNOWN"; } }
protected void ucScriptManager_AsyncPostBackError(object sender, AsyncPostBackErrorEventArgs e) { string userName = ""; string pageUrl = ""; //string app = UcConfParameters.UcAppName; if (page != null) { userName = page.UserName; pageUrl = page.Request.Url.ToString(); } Exception ex = new Exception("UCENTRIK Exception Code: " + "AJAX", e.Exception); UcSystem.HandleException(ex, userName, pageUrl); string errorPath = AppHelper.GetApplicationPath("~/dirApp/error.aspx?code=AJAX"); Response.Redirect(errorPath); }
private void _doRoutine() { Thread.Sleep(15000); // delay 15 sec try { while (true) { _agentPool.DoRoutine(); Thread.Sleep(1000); // repeat every 1 sec } } catch (ThreadAbortException) { //Warning: ASP.NET aborts current thread } catch (Exception ex) { UcSystem.HandleException(ex, "[_UcAppBot_]", ""); } }