Multiple exceptions reported


Author
Message
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
Unfortunately, I cannot reproduce the error in order to watch the code.  This originated from a user who has not been able to supply me with any additional information.  This is not the only repeated unhandled exception that occurs, though.  Several others have done this, too (all fixed at this point).  When I run into one, again, I will reproduce, set a breakpoint and watch the method for any key info.

Thanks,
Bill

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
There is really no way for me to diagnose this over the forum like this.  In the two stack traces that you provided, you have two errors.  One from the BO and another straight from the DAL on the SQL side.  If you want to know where this is coming from, put a break point at the top of your unhandled exception code, and then look at tha Call Stack when you get there.  This will at least clue you in as to why you are getting here more than once.  It appears that there are 4 exceptions being raised...if you look at the Call Stack then you might be clued in as to why you are ending up here 4 times.
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
Thanks for answering.  Below is all of the data that I could provide.  I have a form with an SF BO.  The user clicks new, enters data, then clicks save.  Normal, so far.  The save routine (not extended by me in any way) detects that the date on the form is invalid (MicroFour.StrataFrame.Data.DataLayerSavingException: SqlDateTime overflow).  An exception occurs and is reported to the form.  Since it is not handled, the exception gets bubbled up to the program.cs and is handled there.  Four times, the exact same inner exception and stack trace are reported:

Inner Exception: MicroFour.StrataFrame.Data.DataLayerSavingException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM. ---> System.Data.SqlTypes.SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
at System.Data.SqlTypes.SqlDateTime.FromTimeSpan(TimeSpan value)
at System.Data.SqlTypes.SqlDateTime.FromDateTime(DateTime value)
at System.Data.SqlTypes.SqlDateTime..ctor(DateTime value)
at System.Data.SqlClient.MetaType.FromDateTime(DateTime dateTime, Byte cb)
at System.Data.SqlClient.TdsParser.WriteValue(Object value, MetaType type, Int32 actualLength, Int32 encodingByteSize, Int32 offset, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader()
at MicroFour.StrataFrame.Data.DbDataSourceItem.InternalExecuteReader(DbCommand Command, Boolean IsTransactional, String TransactionKey)
at MicroFour.StrataFrame.Data.SqlDataSourceItem.UpdateRow(QueryInformation QueryInfo, DataRow RowToUpdate, ConcurrencyExceptionHandler ConcurrencyHandler, AddRowErrorHandler RowErrorHandler, Boolean RecreateCommand)
at MicroFour.StrataFrame.Data.DbDataSourceItem.UpdateRow(QueryInformation QueryInfo, DataRow RowToUpdate, ConcurrencyExceptionHandler ConcurrencyHandler, AddRowErrorHandler RowErrorHandler)
at MicroFour.StrataFrame.Data.DataLayer.UpdateDataTableThread(Object ThreadParams)
--- End of inner exception stack trace ---
at MicroFour.StrataFrame.Data.DataLayer.SaveByForm(DataTable TableToSave, Boolean Transactional, String TransactionKey)
at MicroFour.StrataFrame.Business.BusinessLayer.SaveByForm(Boolean Transactional, String TransactionKey)

The stack trace is the same, too:

Stack Trace: at MicroFour.StrataFrame.Business.BusinessLayer.SaveByForm(Boolean Transactional, String TransactionKey)
at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.Save(Boolean Transactional, String TransactionKey)
at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.Save()
at MicroFour.StrataFrame.UI.Windows.Forms.MaintenanceFormToolStrip.cmdSave_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)
at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Here is my UnhandledExceptionFound method:

private static void UnhandledExceptionFound(UnhandledExceptionFoundEventArgs e)
{
    e.Handled =
true;
   
String mUserData = "No additional user information has been supplied.";
    Aspire.SF.
SPXExceptionData mNewForm = new Aspire.SF.SPXExceptionData(e.UnhandledException);
   
if (mNewForm.ShowDialog() == DialogResult.OK)
    {
        mUserData = mNewForm._userinfo;
    }
   
String mVersionString = "";
   
if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)
    {
        System.Deployment.Application.
ApplicationDeployment ad = System.Deployment.Application.ApplicationDeployment.CurrentDeployment;
        mVersionString = ad.CurrentVersion.ToString();
    }
   
else
   
{
        mVersionString =
"-: Debugging Mode :-";
    }
   
MailMessage mMail = new MailMessage();
   
SmtpClient mSmtp = new SmtpClient("MailServer");
    Aspire.Model.
UserBO mUser = new Aspire.Model.UserBO();
    mUser.FillByPrimaryKey(
SecurityBasics.CurrentUser.UserPK);
    mMail.From =
new MailAddress(mUser.EmailAddress, mUser.FullName);
    mMail.To.Add(
ourhelpdeskemailaddress@spiratex.com);
    mMail.Subject =
"Aspire v3.5 :: Unhandled Exception Report";
    mMail.Body =
"User Information: " + mUserData + "\r" + "\r";
    mMail.Body +=
"Version: " + mVersionString + "\r" + "\r";
    mMail.Body +=
"Message: " + e.UnhandledException.Message + "\r" + "\r";
    mMail.Body +=
"Source: " + e.UnhandledException.Source + "\r" + "\r";
    mMail.Body +=
"Inner Exception: " + e.UnhandledException.InnerException + "\r" + "\r";
    mMail.Body +=
"Stack Trace: " + e.UnhandledException.StackTrace;
    mSmtp.Send(mMail);
}

If you could tell me where I am making this error report repeat itself, I would really appreciate it.  Thanks!
Bill


Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Why do I get so many exception reports for one exception?

I have no idea without looking at your code or you providing some additional information.  This could happen due to your code and logic.  For example, if an error occurs and there is subsequent logic referencing the same field, then this could happen.  There are literally a limitless number of scenarios in which this could happen.  You may need to take this into account within you app...but more than likely you have something that continues to reference that field and produce additional errors.

Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
A user tried to save a record with a date that was out of range of the expected date.  Naturally, this threw an exception which was unhandled by the form.  So, it bubbles up to my UnhandledExceptionFound method of program.cs.  My method simply sends an email to my HelpDesk system so that I can begin working on the resolution.  The exception went Lawrence Welk on me.  The problem is that I get four (4) notifications for the exact same exception. 

Why do I get so many exception reports for one exception?

Thanks,
Bill

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search