Ejemplo n.º 1
0
        /// Handles the Exception event of the BuyNowButton1_IPN control. This event is fired if there is any Exception
        /// thrown in your IPN_Notified event handler method or if there was any exception thrown in the notification
        /// verification phase of IPN. It is better to handle this event and keep your IPN_Notified event clean without
        /// using TRY-CATCH block there.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="SpiceLogic.PayPalCtrlForWPS.Core.IPNExceptionEventArgs"/> instance containing the event data.</param>
        protected void btnHandler_IPN_Exception(object sender, SpiceLogic.PayPalCtrlForWPS.Core.IPNExceptionEventArgs e)
        {
            StringBuilder debugDataBuilder = new StringBuilder();
            string        errorMessage     = e.IpnException.Message;

            debugDataBuilder.AppendLine(errorMessage);
            debugDataBuilder.AppendLine();
            debugDataBuilder.AppendLine("Stack Trace : ----------");
            debugDataBuilder.AppendLine(e.IpnException.StackTrace);
            debugDataBuilder.AppendLine();
            debugDataBuilder.AppendLine("-----------------");
            debugDataBuilder.AppendLine("Exception occured at " + e.ExceptionDateTime);
            debugDataBuilder.AppendLine("Is this ipn resent ? : " + e.IsResent);
            debugDataBuilder.AppendLine("Sent Http Status Code : " + e.IpnResponse.StatusCode);
            SendMailDL.SendMail("Exception", debugDataBuilder.ToString(), false);
            ErrorLogDL.Insert(e.IpnException);
        }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         Exception ex1 = Server.GetLastError();
         Server.ClearError();
         if (ex1.Message == "File does not exist.")
         {
             return;
         }
         if (ex1 != null)
         {
             int id = ErrorLogDL.Insert((Exception)ex1);
             lblError.Text = id.ToString();
             return;
         }
     }
     catch { }
     lblError.Text = "Unknown";
 }
Ejemplo n.º 3
0
 protected void odsReproductions_Deleted( object sender, ObjectDataSourceStatusEventArgs e )
 {
     if (e.Exception != null)
         ErrorLogDL.Insert( e.Exception );
 }
Ejemplo n.º 4
0
 protected void ObjectDataSource1_Updated( object sender, ObjectDataSourceStatusEventArgs e )
 {
     if (e.Exception != null)
         ErrorLogDL.Insert( e.Exception );
 }