I have code that will be for example
Dim cmd As New SqlClient.SqlCommand(commandString, databaseString)
Dim result As Integer
Try
result = cmd.ExecuteScalar()
Catch e as Exception
'catch exception code
End Try
Instead of doing that, can I override the ExecuteScalar function to do some kind of generic exception catching?