numeric values for ex.messages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pelusa
    New Member
    • Nov 2007
    • 9

    numeric values for ex.messages

    Hello,

    my question is: are there equivalent numeric values to ex.messages?

    i.e. If (ex.Message = "Logon failure: unknown user name or bad password")

    if i don't want to use text as the check value what value can then be the equivalent to this exemption?

    Thank you.

    I am developing in ms visual studio 2005 vb.net
  • krishnabhargav
    New Member
    • Feb 2008
    • 24

    #2
    Originally posted by pelusa
    Hello,

    my question is: are there equivalent numeric values to ex.messages?

    i.e. If (ex.Message = "Logon failure: unknown user name or bad password")

    if i don't want to use text as the check value what value can then be the equivalent to this exemption?

    Thank you.

    I am developing in ms visual studio 2005 vb.net
    programming for exceptions is considered to bad. Instead modify your code such that as much as possible do not throw exception and instead return status as Enum or boolean or whatever that makes sense.

    usually exception messages are for feedback purpose. may be i am wrong, but this is my opinion.

    Comment

    • manovich
      New Member
      • Sep 2007
      • 3

      #3
      Also, you can't rely on exception message. You should rely on exception type to distinguish two different types of exception.

      Comment

      Working...