Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Exception Number in exception

Author  Topic 

nomaneagle
Starting Member

18 Posts

Posted - 2008-11-11 : 10:51:14
Is there any way that I can find an exception number on the basis of exception like

Try

catch ex as exception
msgbox (ex.number)
end try

As a matter of fact, exception number works fine with SqlException. But as soon as you start catching exception, exception number property is not visisble for exception. Any clue?

Thanks

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-11-11 : 13:57:10
[code]

Try
{
//Your risky code goes here
}
catch(System.Exception e)
{
Label1.Text = e.Message;
}
[/code]
Go to Top of Page

nomaneagle
Starting Member

18 Posts

Posted - 2008-11-11 : 16:58:43
Well Im looking for exception number not for message. Any clue about exception number?
Go to Top of Page
   

- Advertisement -