Z
Zytan
I deal with a bunch of exception handlers by calling a function that
writes the info to a log file. Of course, this takes in Exception, so
I can pass it any exception class. But, it'd be great if somehow I
could state what the type of the exception it was. I do know that I
cannot really make use of it, since this function would have to know
about ALL possible derived classes, which it cannot. And I do know
that Exception.Message exists to print out. But, I was just thinking
if there's anything else I could do, in such a generic function, to
help the reader of the log file understand what happened.
Any thoughts are welcome.
Zytan
writes the info to a log file. Of course, this takes in Exception, so
I can pass it any exception class. But, it'd be great if somehow I
could state what the type of the exception it was. I do know that I
cannot really make use of it, since this function would have to know
about ALL possible derived classes, which it cannot. And I do know
that Exception.Message exists to print out. But, I was just thinking
if there's anything else I could do, in such a generic function, to
help the reader of the log file understand what happened.
Any thoughts are welcome.
Zytan