Skip to content

Instantly share code, notes, and snippets.

@PatrickMcDonald
Created May 23, 2012 15:02
Show Gist options
  • Save PatrickMcDonald/2775741 to your computer and use it in GitHub Desktop.
Save PatrickMcDonald/2775741 to your computer and use it in GitHub Desktop.
A basic sub-class of System.Exception that passes FxCop (VB.NET)
Imports System.Runtime.Serialization
<Serializable()>
Public Class CustomException
Inherits Exception
Public Sub New()
MyBase.New()
End Sub
Public Sub New(ByVal message As String)
MyBase.New(message)
End Sub
Public Sub New(ByVal message As String, ByVal innerException As Exception)
MyBase.New(message, innerException)
End Sub
Protected Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext)
MyBase.New(info, context)
End Sub
End Class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment