throw special errors for db ops
This commit is contained in:
@@ -83,8 +83,7 @@ Public Class DB
|
|||||||
|
|
||||||
Return result
|
Return result
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Console.WriteLine("Error while executing SQL Scalar-Query ({0}): {1}", queryString, ex.Message)
|
Throw New Exception(String.Format("Error while executing SQL Scalar-Query ({0}): {1}", queryString, ex.Message))
|
||||||
Return Nothing
|
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -102,8 +101,7 @@ Public Class DB
|
|||||||
|
|
||||||
Return True
|
Return True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Console.WriteLine("Error while executing SQL Query ({0}): {1}", queryString, ex.Message)
|
Throw New Exception(String.Format("Error while executing SQL Non-Query ({0}): {1}", queryString, ex.Message))
|
||||||
Return False
|
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -121,8 +119,7 @@ Public Class DB
|
|||||||
|
|
||||||
Return dt
|
Return dt
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Console.WriteLine("Error while executing SQL Non-Query ({0}): {1}", queryString, ex.Message)
|
Throw New Exception(String.Format("Error while executing SQL Query ({0}): {1}", queryString, ex.Message))
|
||||||
Return Nothing
|
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user