Namespaces
Variants
Views
Actions

std::ios_base::failure::failure

From cppreference.com
< cpp‎ | io‎ | ios base‎ | failure
Revision as of 16:54, 2 November 2012 by P12bot (Talk | contribs)

Template:ddcl list begin <tr class="t-dcl ">

<td >
explicit failure( const std::string& message );

explicit failure( const std::string& message,

                  const std::error_code& ec = std::io_errc::stream );
</td>

<td class="t-dcl-nopad"> </td> <td > (until C++11)

(since C++11) </td> </tr> <tr class="t-dcl ">

<td >
explicit failure( const char* message,
                  const std::error_code& ec = std::io_errc::stream );
</td>

<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> Template:ddcl list end

Constructs the exception object using message as explanation string which can later be retrieved using what().

Parameters

message - explanatory string

Example