ExceptionHelpersErrorCodeFromException Method

A method to get the Alpaca Error Code for an Exception. Returns UnspecifiedError if it cannot find a better code

Definition

Namespace: ASCOM.Common.Helpers
Assembly: ASCOM.Common (in ASCOM.Common.dll) Version: 4.0.0+77e18c564bf9ecdb0ef30166e894390d1b7d077c
C#
public static AlpacaErrors ErrorCodeFromException(
	Exception ex
)

Parameters

ex  Exception
The exception to get the error code for

Return Value

AlpacaErrors
The best matching ErrorCode for the exception, UnspecifiedError if a better one cannot be found

Version Information

Supported in: .NET Standard 2.0, .NET 8 .NET 9. .NET 10

See Also