Windows Dev Center

Exception::Exception Constructor

Intializes a new instance of the Exception class.

    Exception(int32 hresult)
    Exception(int32 hresult, ::Platform::String^ message)


The error HRESULT that is represented by the exception.


A user-specified message, such as prescriptive text, that is associated with the exception. In general you should prefer the second overload in order to provide a descriptive message that is as specific as possible about how and why the error has occurred.

Minimum supported client: Windows 8

Minimum supported server: Windows Server 2012

Namespace: Platform

Metadata: platform.winmd

© 2015 Microsoft