C++ Exception Library - code



Description

It is used to get error code.

Declaration

Following is the declaration for std::code.

const error_code& code() const noexcept;

C++11

const error_code& code() const noexcept;

Parameters

none

Return Value

It returns the error_code object associated with the exception.

Exceptions

No-throw guarantee − no members throw exceptions.

exception.htm
Advertisements