COM methods report errors by returning HRESULTs, while NGWS methods report them by throwing exceptions. The NGWS runtime handles the transition between the two. Each exception class in NGWS maps to an HRESULT. User-defined exception classes can specify whatever HRESULT is appropriate, and they can dynamically change the HRESULT to be returned when the exception is thrown by setting the ErrorCode property on the exception object. Additional information about the exception is provided to the client through the IErrorInfo interface, which is implemented on the NGWS object in the unmanaged process space.