This is the generic driver exception. Drivers are permitted to directly throw this exception as well as any derived exceptions. Note that the Message property is a member of Exception, the base class of DriverException. The HResult property of Exception is simply renamed to Number.

This exception should only be thrown if there is no other more appropriate exception already defined, e.g. PropertyNotImplemented, InvalidOperationException, InvalidValueException, NotConnectedException etc. These specific exceptions should be thrown where appropriate rather than using the more generic DriverException. Conform will not accept DriverExceptions where more appropriate exceptions are already defined.

As good programming practice, the Message property should not be empty, so that users understand why the exception was thrown.

Namespace: ASCOM
Assembly: ASCOM.Exceptions (in ASCOM.Exceptions.dll) Version: 6.0.0.0 (6.1.1.2619)

Syntax

C#
[SerializableAttribute]
public class DriverException : Exception
Visual Basic
<SerializableAttribute> _
Public Class DriverException _
	Inherits Exception
Visual C++
[SerializableAttribute]
public ref class DriverException : public Exception

Inheritance Hierarchy

See Also