Skip to content

Commit

Permalink
Merge branch 'Dev-2.2' of https://github.com/nutdotnet/WinNUT-Client
Browse files Browse the repository at this point in the history
…into Dev-2.2
  • Loading branch information
gbakeman committed Sep 9, 2022
2 parents fd42982 + aa2342c commit 01a078b
Show file tree
Hide file tree
Showing 5 changed files with 360 additions and 286 deletions.
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

0 comments on commit 01a078b

Please sign in to comment.