Try
'Code that may cause an error
'Like a sql server database
Catch SqlEx As SqlException 'A sql specific exception
'Code to handle the exception
Catch ex As Exception 'A general one if the exception isnt one of the above ones
'Code to handle the exception
End Try