Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions WinNUT_V2/WinNUT-Client_Common/Common_Classes.vb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Public Class Nut_Exception
Inherits System.ApplicationException

Public Property ExceptionValue As Nut_Exception_Value
Public Property ProtocolError As NUTResponse

Public Sub New(ByVal Nut_Error_Lvl As Nut_Exception_Value)
MyBase.New(StringEnum.GetStringValue(Nut_Error_Lvl))
Expand All @@ -45,6 +46,16 @@ Public Class Nut_Exception
MyBase.New(StringEnum.GetStringValue(Nut_Error_Lvl) & Message, innerEx)
ExceptionValue = Nut_Error_Lvl
End Sub

''' <summary>
''' Raise a Nut_Exception that resulted from an error as part of the NUT protocol.
''' </summary>
''' <param name="protocolError"></param>
''' <param name="message"></param>
Public Sub New(protocolError As NUTResponse, message As String)
MyBase.New(message)
Me.ProtocolError = protocolError
End Sub
End Class

Public Class Nut_Parameter
Expand Down
Loading