NCBI C++ ToolKit
Public Member Functions | Private Attributes | List of all members
xml::parser_exception Class Reference

Search Toolkit Book for xml::parser_exception

The xml::parser_exception class is used to store parsing and validating exception information. More...

#include <misc/xmlwrapp/errors.hpp>

+ Inheritance diagram for xml::parser_exception:
+ Collaboration diagram for xml::parser_exception:

Public Member Functions

virtual const char * what () const noexcept
 Convert error messages into a printable C-style string. More...
 
const error_messagesget_messages (void) const
 Get error messages. More...
 
 parser_exception (const error_messages &msgs)
 Create a new object using the given list of error messages. More...
 
virtual ~parser_exception () noexcept
 Destroy the object. More...
 
 parser_exception (const parser_exception &other)=default
 
parser_exceptionoperator= (const parser_exception &other)=default
 
 parser_exception (parser_exception &&other)=default
 
parser_exceptionoperator= (parser_exception &&other)=default
 

Private Attributes

error_messages messages_
 
std::string buffer
 

Detailed Description

The xml::parser_exception class is used to store parsing and validating exception information.

Definition at line 213 of file errors.hpp.

Constructor & Destructor Documentation

◆ parser_exception() [1/3]

parser_exception::parser_exception ( const error_messages msgs)

Create a new object using the given list of error messages.

Parameters
msgsThe error messages.

Definition at line 156 of file errors.cpp.

◆ ~parser_exception()

virtual xml::parser_exception::~parser_exception ( )
inlinevirtualnoexcept

Destroy the object.

Definition at line 241 of file errors.hpp.

◆ parser_exception() [2/3]

xml::parser_exception::parser_exception ( const parser_exception other)
default

◆ parser_exception() [3/3]

xml::parser_exception::parser_exception ( parser_exception &&  other)
default

Member Function Documentation

◆ get_messages()

const error_messages & parser_exception::get_messages ( void  ) const

Get error messages.

Returns
The error messages.

Definition at line 165 of file errors.cpp.

References messages_.

◆ operator=() [1/2]

parser_exception& xml::parser_exception::operator= ( const parser_exception other)
default

◆ operator=() [2/2]

parser_exception& xml::parser_exception::operator= ( parser_exception &&  other)
default

◆ what()

const char * parser_exception::what ( void  ) const
virtualnoexcept

Convert error messages into a printable C-style string.

Returns
string representation of the errors list ('
' separated).

Definition at line 160 of file errors.cpp.

References buffer, messages_, and xml::error_messages::print().

Referenced by CEutilsClient::x_LinkOut(), and CEutilsClient::x_Summary().

Member Data Documentation

◆ buffer

std::string xml::parser_exception::buffer
mutableprivate

Definition at line 254 of file errors.hpp.

Referenced by what().

◆ messages_

error_messages xml::parser_exception::messages_
private

Definition at line 253 of file errors.hpp.

Referenced by get_messages(), and what().


The documentation for this class was generated from the following files:
Modified on Sat Feb 24 07:46:55 2024 by modify_doxy.py rev. 669887