ExceptionHelpersExceptionFromErrorCode Method

Gets a driver exception from an error code and adds the message if available

Definition

Namespace: ASCOM.Common.Helpers
Assembly: ASCOM.Common (in ASCOM.Common.dll) Version: 3.0.0-rc.1+86c25ce733aebb4d8b1b8a62e84770ea5e972bea
C#
public static DriverException ExceptionFromErrorCode(
	AlpacaErrors code,
	string message = ""
)

Parameters

code  AlpacaErrors
The Alpaca ErrorCode for the Exception
message  String  (Optional)
The optional message of the exception

Return Value

DriverException
Null if there is no exception, otherwise the ASCOM Exception for the error code

Version Information

.NET Standard

Supported in: 2.0

See Also