I have a windows Forms project that references a dataAccess Class Library.
From the windows forms project, I make all data calls to the Class Libary and I want to be able to handle exceptions from the windows forms if an exception occurs in the class library.
I have the code below that I use in my Class Library.
How can I make it so the Windows Forms application will handle an exception.
I am using "Throw" but windows application still crashes
Public Function FillArcustComboBoxDataTable() As DataTable
Dim dt As New Data.DataTable
Dim sqlcmdtext As String = "SELECT ccustno FROM arcust WHERE cstatus = 'a'"
Using SqlConn As New SqlConnection(My.Settings.VAMSQL_ConnString)
Using da As New SqlDataAdapter(sqlcmdtext, SqlConn)
Catch ex As Exception
'TODO: test exeption
Throw New Exception(ex.Message)