Link to home
Start Free TrialLog in
Avatar of Soluga
Soluga

asked on

try catch

asp.net 2.0, In my catch statement I have
                    Catch ex As Exception
                        Throw (ex.InnerException)
                        Response.Write("An Error Occurred: " & e.ToString())
                    End Try

but when the error is thrown I get ..
An Error Occurred: System.EventArgsAn

Is there a way to get a more meaningful message?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Göran Andersson
Göran Andersson
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Try this line
   Response.Write("An Error Occured: " & ex.message)

This will display the actual error message that has been generated.
Avatar of Soluga
Soluga

ASKER

Great thanks, obvious now.