Redigera

Dela via


runtime_exception Class

The base type for exceptions in the C++ Accelerated Massive Parallelism (AMP) library.

Syntax

class runtime_exception : public std::exception;

Members

Public Constructors

Name Description
runtime_exception Constructor Initializes a new instance of the runtime_exception class.
~runtime_exception Destructor Destroys the runtime_exception object.

Public Methods

Name Description
get_error_code Returns the error code that caused the exception.

Public Operators

Name Description
operator= Copies the contents of the specified runtime_exception object into this one.

Inheritance Hierarchy

exception

runtime_exception

Requirements

Header: amprt.h

Namespace: Concurrency

runtime_exception Constructor

Initializes a new instance of the class.

Syntax

runtime_exception(
    const char * _Message,
    HRESULT _Hresult ) throw();

explicit runtime_exception(
    HRESULT _Hresult ) throw();

runtime_exception(
    const runtime_exception & _Other ) throw();

Parameters

_Message
A description of the error that caused the exception.

_Hresult
The HRESULT of error that caused the exception.

_Other
The runtime_exception object to copy.

Return Value

The runtime_exception object.

~runtime_exception Destructor

Destroys the object.

Syntax

virtual ~runtime_exception() throw();

get_error_code

Returns the error code that caused the exception.

Syntax

HRESULT get_error_code() const throw();

Return Value

The HRESULT of error that caused the exception.

operator=

Copies the contents of the specified runtime_exception object into this one.

Syntax

runtime_exception & operator= (    const runtime_exception & _Other ) throw();

Parameters

_Other
The runtime_exception object to copy.

Return Value

A reference to this runtime_exception object.

See also

Concurrency Namespace (C++ AMP)