Constructors: NewExceptionBase

NewExceptionBase

Creates a new base utility class that can be contained within an exception class.



 Public Function NewExceptionBase(
	  Optional ByVal Subclass As Object,
	  Optional ByVal AppTitle As String,
	  Optional ByVal Message As String,
	  Optional ByVal InnerException As Exception,
	  Optional ByVal HResult As Long = 5,
	  Optional ByVal Source As String,
	  Optional ByVal HelpLink As String ) As ExceptionBase

Parameters

Subclass
[ByVal] Optional. Object. The containing exception class that will contain this object instance.
AppTitle
[ByVal] Optional. String. The title of the application that contains the exception class.
Message
[ByVal] Optional. String. An understandable message that describes the exception being thrown.
InnerException
[ByVal] Optional. Exception. The exception that caused the current exception to be thrown.
HResult
[ByVal] Optional. Long. The error code for the current exception.  

Default: 5

Source
[ByVal] Optional. String. A description of the source of the current exception.
HelpLink
[ByVal] Optional. String. A file or URL link to a help resource.

Return Values

ExceptionBase -  A new base class used for default handling of exception routines.

Remarks

Most exception classes simply contain this information to be retrieved for viewing. Few exception classes have additional requirements. This class can be used to handle the default set of information for an exception class. By containing this class inside the exception class, the exception class can delegate calls to this class for standard handling.

If additional values need to be maintained, then this class also supports the ability to set and get additional values using a String name as the key. The ArgumentException class uses this to hold the name of the parameter that caused the exception.

This class is persistable and will also attempt to persist the custom values that have been added to it. If the persistence fails, then an error will occur.

See Also

Project VBCorLib Overview Class Constructors Overview Constructors Properties Constructors Methods NewException NewExternalException