EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
Public Member Functions | List of all members
EBGeometry::Parser::ParseError Class Reference

Thrown by the file readers, and by PolygonSoup::clean() and convertToDCEL(), when a file cannot be read into a mesh. More...

#include <EBGeometry_ParseError.hpp>

Inheritance diagram for EBGeometry::Parser::ParseError:
Inheritance graph
[legend]
Collaboration diagram for EBGeometry::Parser::ParseError:
Collaboration graph
[legend]

Public Member Functions

 ParseError (const std::string &a_file, const std::size_t a_line, const std::string &a_reason)
 Constructor.
 
const std::string & file () const noexcept
 File being read.
 
std::size_t line () const noexcept
 Line where the problem was found.
 
const std::string & reason () const noexcept
 What is wrong.
 

Detailed Description

Thrown by the file readers, and by PolygonSoup::clean() and convertToDCEL(), when a file cannot be read into a mesh.

Reports the file, the line where the problem was found (0 when there is no meaningful line, as in a binary file or a file that could not be opened), and the reason. what() combines them as "file:line: reason", or "file: reason" when the line is 0.

Constructor & Destructor Documentation

◆ ParseError()

EBGeometry::Parser::ParseError::ParseError ( const std::string &  a_file,
const std::size_t  a_line,
const std::string &  a_reason 
)
inline

Constructor.

Parameters
[in]a_fileFile being read.
[in]a_line1-based line where the problem was found, or 0.
[in]a_reasonWhat is wrong.

Member Function Documentation

◆ file()

const std::string & EBGeometry::Parser::ParseError::file ( ) const
inlinenoexcept

File being read.

Returns
The file name as passed to the reader.

◆ line()

std::size_t EBGeometry::Parser::ParseError::line ( ) const
inlinenoexcept

Line where the problem was found.

Returns
1-based line number, or 0 when there is no meaningful line.

◆ reason()

const std::string & EBGeometry::Parser::ParseError::reason ( ) const
inlinenoexcept

What is wrong.

Returns
The reason, without the file and line.

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