internal static void Throw(WbemNative.WbemStatus hr) { switch (hr) { case WbemNative.WbemStatus.WBEM_E_NOT_FOUND: throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WbemInstanceNotFoundException()); case WbemNative.WbemStatus.WBEM_E_INVALID_PARAMETER: throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WbemInvalidParameterException()); case WbemNative.WbemStatus.WBEM_E_NOT_SUPPORTED: throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WbemNotSupportedException()); case WbemNative.WbemStatus.WBEM_E_INVALID_METHOD: throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WbemInvalidMethodException()); } throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new WbemException(hr)); }
internal WbemException(WbemNative.WbemStatus hr) : base((int)hr) { }