The Battle for Wesnoth  1.19.5+dev
Public Member Functions | Public Attributes | List of all members
invalid_pbl_exception Struct Reference

Exception thrown when the WML parser fails to read a .pbl file. More...

#include <manager.hpp>

Inheritance diagram for invalid_pbl_exception:

Public Member Functions

 invalid_pbl_exception (const std::string &pbl_path, const std::string &msg)
 Constructor. More...
 
virtual ~invalid_pbl_exception () noexcept
 Destructor. More...
 
virtual const char * what () const noexcept
 Returns a pointer to the (constant) error description. More...
 

Public Attributes

const std::string path
 Path to the faulty .pbl file. More...
 
const std::string message
 Error message to display. More...
 

Detailed Description

Exception thrown when the WML parser fails to read a .pbl file.

Definition at line 44 of file manager.hpp.

Constructor & Destructor Documentation

◆ invalid_pbl_exception()

invalid_pbl_exception::invalid_pbl_exception ( const std::string &  pbl_path,
const std::string &  msg 
)
inline

Constructor.

Parameters
pbl_pathPath to the faulty .pbl file.
msgAn error message to display.

Definition at line 52 of file manager.hpp.

◆ ~invalid_pbl_exception()

virtual invalid_pbl_exception::~invalid_pbl_exception ( )
inlinevirtualnoexcept

Destructor.

Virtual to allow for subclassing.

Definition at line 65 of file manager.hpp.

Member Function Documentation

◆ what()

virtual const char* invalid_pbl_exception::what ( ) const
inlinevirtualnoexcept

Returns a pointer to the (constant) error description.

Returns
A pointer to a const char*. The underlying memory is in posession of the Exception object. Callers must not attempt to free the memory.

Definition at line 72 of file manager.hpp.

References message.

Member Data Documentation

◆ message

const std::string invalid_pbl_exception::message

Error message to display.

Definition at line 60 of file manager.hpp.

Referenced by what().

◆ path

const std::string invalid_pbl_exception::path

Path to the faulty .pbl file.

Definition at line 57 of file manager.hpp.


The documentation for this struct was generated from the following file: