ExceptionHelpersErrorCode Method
Extension method to get the Alpaca Error Code for an Exception. Returns UnspecifiedError if it cannot find a better code
Namespace: ASCOM.Common.HelpersAssembly: ASCOM.Common (in ASCOM.Common.dll) Version: 3.0.0-rc.1+86c25ce733aebb4d8b1b8a62e84770ea5e972bea
public static AlpacaErrors ErrorCode(
this Exception ex
)
<ExtensionAttribute>
Public Shared Function ErrorCode (
ex As Exception
) As AlpacaErrors
- ex Exception
- The exception to get the error code for
AlpacaErrorsThe best matching ErrorCode for the exception, UnspecifiedError if a better one cannot be foundIn Visual Basic and C#, you can call this method as an instance method on any object of type
Exception. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Supported in: 2.0