C#

Moderators: None (Apply to moderate this forum)
Number of threads: 2722
Number of posts: 5749

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Exception handling Posted by floozy on 18 Dec 2003 at 6:35 AM
Gday everyone.

Id like to create a file to save all exception messages, so I added code to most of catch my catches, and the good thing is it works.
Now I tried the same thing as release version but dont get any results!! File stays the way it is.

Can anyone help?
Report
Re: Exception handling Posted by iwilld0it on 18 Dec 2003 at 12:23 PM
: Gday everyone.
:
: Id like to create a file to save all exception messages, so I added code to most of catch my catches, and the good thing is it works.
: Now I tried the same thing as release version but dont get any results!! File stays the way it is.
:
: Can anyone help?
:

Is it possible you are not gettinh any errors. Because a Catch doesn't execute when no exceptions are thrown.
Report
Re: Exception handling Posted by floozy on 19 Dec 2003 at 6:02 AM
: Is it possible you are not gettinh any errors. Because a Catch doesn't execute when no exceptions are thrown.
:
Nope, Ive made a little calculator to test, before I dare to implement it into the companys product.

I can create a variety of exceptions. going through with debug no problem. This is not possible in release of course. Didnt find anything mentioned in docu about different handling of exceptions for release/debug either. One thing I found out: string of Exception is different in the two versions. In release it doesnt contain any path information. This caused my test app to crash in release.

Thanks.
Report
Re: Exception handling Posted by iwilld0it on 19 Dec 2003 at 8:45 AM
: : Is it possible you are not gettinh any errors. Because a Catch doesn't execute when no exceptions are thrown.
: :
: Nope, Ive made a little calculator to test, before I dare to implement it into the companys product.
:
: I can create a variety of exceptions. going through with debug no problem. This is not possible in release of course. Didnt find anything mentioned in docu about different handling of exceptions for release/debug either. One thing I found out: string of Exception is different in the two versions. In release it doesnt contain any path information. This caused my test app to crash in release.
:
: Thanks.
:

That would be because the release version does not compile w/ the Debug symbols, so .NET has no way of telling you which line an exception has occured. You may need to change the way you log your exceptions.
Report
Re: Exception handling Posted by floozy on 22 Dec 2003 at 1:05 AM
: That would be because the release version does not compile w/ the Debug symbols, so .NET has no way of telling you which line an exception has occured. You may need to change the way you log your exceptions.
:
Okay, I figured there is no path and line info in release so I changed code. Works okay now, but is no as helpful as debug.

thanks and merry X-mas





 

Recent Jobs