|
-
Jan 6th, 2004, 02:57 PM
#1
Object to System.Exception [RESOLVED]
I need a dynamic array, so I am using an ArrayList, however, I need it to contain Exceptions. I can add Exceptions to it fine, however, using them and trying to return just 1 of them (i.e. return ArrayList1[0]) is a problem.
When I add an Exception to the ArrayList, it converts it to an Object and once it puts it inside of the list, I cannot use it as an Exceptions anymore.
Is there a way to hold Exceptions in a dynamic array? Regular arrays with a set max just don't seem to work for some reason.
Also, is there a way to capture ALL Exceptions that happen within a program? Like some sort of an event? Or am I going to have to encapsulate everything in try/catch statements?
Incase you haven't noticed, I'm trying to write a self-contained DLL file in which writes the user's computer information to a log file, then on close, ALL exception information that happens with my program is also written to the log file. Later I'm gonna make a dialogbox out of just code to ask the user if they want to send it directly to me. This would make it alot easier to track errors on computers once it leaves the development environment.
Last edited by Kasracer; Jan 6th, 2004 at 11:08 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|