ExceptionExtensions.CheckIotHubErrorCode(Exception, ErrorCode[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Indicates if the supplied exception is an IoT hub exception and its error code belongs to the supplied error code list.
public static bool CheckIotHubErrorCode (this Exception ex, params Microsoft.Azure.Devices.Common.Exceptions.ErrorCode[] errorCodeList);
static member CheckIotHubErrorCode : Exception * Microsoft.Azure.Devices.Common.Exceptions.ErrorCode[] -> bool
<Extension()>
Public Function CheckIotHubErrorCode (ex As Exception, ParamArray errorCodeList As ErrorCode()) As Boolean
Parameters
- ex
- Exception
The exception to test.
- errorCodeList
- ErrorCode[]
The list containing possible error codes.
Returns
True if the exception is an IoT hub exception, and its error code is present in the supplied error code list; otherwise, false.
Applies to
Azure SDK for .NET
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for