Opc.Ua.Com.ComUtils.CreateComException C# (CSharp) Method

CreateComException() public static method

Converts an exception to an exception that returns a COM error code.
public static CreateComException ( Exception e ) : Exception
e System.Exception
return System.Exception
		public static Exception CreateComException(Exception e)
		{
			// nothing special required for external exceptions.
			if (e is COMException)
			{
				return e;
			}

			// convert other exceptions to E_FAIL.
			return new COMException(e.Message, ResultIds.E_FAIL);
		}

Same methods

ComUtils::CreateComException ( Exception e, int errorId ) : Exception
ComUtils::CreateComException ( int errorId ) : Exception
ComUtils::CreateComException ( string message, int errorId ) : Exception