-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBaseExceptionProperties.vb
42 lines (41 loc) · 1.23 KB
/
BaseExceptionProperties.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Public Class BaseExceptionProperties
Protected mHasException As Boolean
''' <summary>
''' Indicate the last operation thrown an exception or not
''' </summary>
''' <returns></returns>
Public ReadOnly Property HasException() As Boolean
Get
Return mHasException
End Get
End Property
Protected mLastException As Exception
''' <summary>
''' Provides access to the last exception thrown
''' </summary>
''' <returns></returns>
Public ReadOnly Property LastException() As Exception
Get
Return mLastException
End Get
End Property
''' <summary>
''' If you don't need the entire exception as in LastException this
''' provides just the text of the exception
''' </summary>
''' <returns></returns>
Public ReadOnly Property LastExceptionMessage As String
Get
Return mLastException.Message
End Get
End Property
''' <summary>
''' Indicate for return of a function if there was an exception thrown or not.
''' </summary>
''' <returns></returns>
Public ReadOnly Property IsSuccessFul As Boolean
Get
Return Not mHasException
End Get
End Property
End Class