J
Jonas
Hi!
I have a general error logging routine that takes a parameter of type
Exception. But if I send in a SqlException, I loose all the Sql-specific
information as the variable is casted to an ordinary Exception. How do I
recast it to its original type without having to hard-code all different
types of exceptions with "typeOf exception Is
System.Data.SqlClient.SqlException" ?
CType(myExp, System.Type(myExp.GetType.FullName))
Something like this above, but it doesn't work because the second argument
returns Nothing.
Any tips?
Brgds
Jonas
I have a general error logging routine that takes a parameter of type
Exception. But if I send in a SqlException, I loose all the Sql-specific
information as the variable is casted to an ordinary Exception. How do I
recast it to its original type without having to hard-code all different
types of exceptions with "typeOf exception Is
System.Data.SqlClient.SqlException" ?
CType(myExp, System.Type(myExp.GetType.FullName))
Something like this above, but it doesn't work because the second argument
returns Nothing.
Any tips?
Brgds
Jonas