Re: Error Question




"MikeJ" <vettes_n_jets@xxxxxxxxx> wrote in message
news:I3eUh.10549$Kd3.2140@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Im Building a error handler application
i dont know how to check the type of exception in my
messageformat() Method
also id like to know if a method is in the exception
Errors Collection in SqlException

how can i check the type of exception and if the
exception object has a Method

Tia
MJ



The System.Exception class should provide what you need.

http://msdn2.microsoft.com/en-us/library/system.exception_members.aspx

The getType() method and message property are good starting places.

Exception is the superclass for numerous exception types:

http://msdn2.microsoft.com/en-us/library/x4xzbdb9.aspx

If you catch Exception, you'll get a polymorphic reference to the actual
subtype.


.



Relevant Pages

  • Error Question
    ... i dont know how to check the type of exception in my ... messageformat() Method ... Errors Collection in SqlException ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Vector and derived classes objects
    ... > wont be called for the objects the pointer points to, hence I dont see ... > any way an exception can be thrown there with my push_back. ... Josuttis as also mentiones that in his STL book. ...
    (comp.lang.cpp)
  • Re: Monte Carlo computer go methods
    ... When I hear of these rapid advancements, ... mostly what every book says: lots of study, trying to play the moves they learn even if they dont understand them, reading, counting liberties, never play a move which one has been told is bad *until* they are sure this is an exception, etc. ...
    (rec.games.go)
  • Re: inheritance question
    ... With the sample code below i get the error that i dont have enough ... arguments for the constructor i dont understand why i am getting that ... ie the "path" which was followed to reach the exception. ...
    (comp.lang.ruby)
  • Re: System.Directoryservices getting TxIsolationLevel exeption?
    ... exception that was thrown and rethrowing it with a more generic exception. ... If you ever do catch and rethrow, ... > Hi Joe.. ... > I dont know if this makes any different but I am trying to add a user ...
    (microsoft.public.dotnet.framework.aspnet.security)