I've caught an exception!! Now what?

Posted by Jonesy on Stack Overflow See other posts from Stack Overflow or by Jonesy
Published on 2010-04-08T12:16:53Z Indexed on 2010/04/08 12:23 UTC
Read the original article Hit count: 219

Filed under:
|
|

Hi folks,

I've started using try catch blocks (bit late i know!) but now im not sure what to do with the exception once i've caught it. What do people usually do here?

-- Jonesy

     Try
        connection.Open()

        Dim sqlCmd As New SqlCommand("do some SQL", connection)

        Dim sqlDa As New SqlDataAdapter(sqlCmd)

        sqlDa.Fill(dt)

    Catch ex As SQLException
              ' ahhhh what to do now!!!?
    Finally
        connection.Close()
    End Try

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about sql