.. index:: pair: class; seams::Error .. _doxid-classseams_1_1_error: class seams::Error ================== .. toctree:: :hidden: Overview ~~~~~~~~ Failure from the C API, or from a rejected argument. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class Error: public std::runtime_error { public: // construction :ref:`Error`(int status, std::string message); // methods :ref:`Status` :ref:`status`() const; int :ref:`code`() const; }; .. _details-classseams_1_1_error: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Failure from the C API, or from a rejected argument. ``what()`` is the text from ``:ref:`seams_handle_error ```. ``:ref:`code() ``` is the status integer. The object does not own a handle. Construction ------------ .. index:: pair: function; Error .. _doxid-classseams_1_1_error_1afa1a477ab0ed901f607dccf49b67680b: .. ref-code-block:: cpp :class: doxyrest-title-code-block Error(int status, std::string message) Build an error from a status and a message. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - status - :ref:`Status ` code. Zero is not thrown by ``check``. * - message - Detail text. An empty string is allowed. Methods ------- .. index:: pair: function; status .. _doxid-classseams_1_1_error_1a262ad62a5e21a2922d47b6fb816ff052: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Status` status() const :ref:`Status ` as the ``:ref:`Status ``` enumeration when the code is known. .. rubric:: Returns: The matching enumerator. .. index:: pair: function; code .. _doxid-classseams_1_1_error_1ab85bb0b64754ec9b459210f58350f930: .. ref-code-block:: cpp :class: doxyrest-title-code-block int code() const :ref:`Status ` integer. Same values as ``:ref:`seams_status ```. .. rubric:: Returns: The code stored at construction.