Public Class AppException Inherits Exception #Region " Properties " Public ExCategory As Category #End Region #Region " Enumerations " Public Enum Category Uncategorized UserNotFound PermissionDenied End Enum #End Region #Region " Constructors " 'Default: Public Sub New() MyBase.New("An application error has occurred") ExCategory = Category.Uncategorized End Sub 'Called with msg argument: Public Sub New(ByVal msg As String) MyBase.New(msg) ExCategory = Category.Uncategorized End Sub 'Called with msg and category arguments: Public Sub New(ByVal msg As String, ByVal cat As Category) MyBase.New(msg) ExCategory = cat End Sub 'Called with msg and ex arguments: Public Sub New(ByVal msg As String, ByVal ex As Exception) MyBase.New(msg, ex) ExCategory = Category.Uncategorized End Sub #End Region End Class