OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::file_parser_error Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/FileParserError.hpp>

Inheritance diagram for Slic3r::file_parser_error:
Collaboration diagram for Slic3r::file_parser_error:

Public Member Functions

 file_parser_error (const std::string &msg, const std::string &file, unsigned long line=0)
 file_parser_error (const std::string &msg, const boost::filesystem::path &file, unsigned long line=0)
 ~file_parser_error () throw ()
std::string message () const
std::string filename () const
unsigned long line () const

Static Private Member Functions

static std::string format_what (const std::string &msg, const std::string &file, unsigned long l)

Private Attributes

std::string m_message
std::string m_filename
unsigned long m_line

Detailed Description

Constructor & Destructor Documentation

◆ file_parser_error() [1/2]

Slic3r::file_parser_error::file_parser_error ( const std::string & msg,
const std::string & file,
unsigned long line = 0 )
inline
18 :
19 Slic3r::RuntimeError(format_what(msg, file, line)),
20 m_message(msg), m_filename(file), m_line(line) {}
std::string m_filename
Definition FileParserError.hpp:37
static std::string format_what(const std::string &msg, const std::string &file, unsigned long l)
Definition FileParserError.hpp:41
unsigned long m_line
Definition FileParserError.hpp:38
std::string m_message
Definition FileParserError.hpp:36
unsigned long line() const
Definition FileParserError.hpp:33

References format_what(), line(), m_filename, m_line, and m_message.

Here is the call graph for this function:

◆ file_parser_error() [2/2]

Slic3r::file_parser_error::file_parser_error ( const std::string & msg,
const boost::filesystem::path & file,
unsigned long line = 0 )
inline
21 :
22 Slic3r::RuntimeError(format_what(msg, file.string(), line)),
23 m_message(msg), m_filename(file.string()), m_line(line) {}

References format_what(), line(), m_filename, m_line, and m_message.

Here is the call graph for this function:

◆ ~file_parser_error()

Slic3r::file_parser_error::~file_parser_error ( )
throw ( )
inline
26{}

Member Function Documentation

◆ filename()

std::string Slic3r::file_parser_error::filename ( ) const
inline
31{ return m_filename; }

References m_filename.

◆ format_what()

std::string Slic3r::file_parser_error::format_what ( const std::string & msg,
const std::string & file,
unsigned long l )
inlinestaticprivate
42 {
43 std::stringstream stream;
44 stream << (file.empty() ? "<unspecified file>" : file.c_str());
45 if (l > 0)
46 stream << '(' << l << ')';
47 stream << ": " << msg;
48 return stream.str();
49 }

Referenced by file_parser_error(), and file_parser_error().

Here is the caller graph for this function:

◆ line()

unsigned long Slic3r::file_parser_error::line ( ) const
inline
33{ return m_line; }

References m_line.

Referenced by file_parser_error(), and file_parser_error().

Here is the caller graph for this function:

◆ message()

std::string Slic3r::file_parser_error::message ( ) const
inline
29{ return m_message; }

References m_message.

Member Data Documentation

◆ m_filename

std::string Slic3r::file_parser_error::m_filename
private

◆ m_line

unsigned long Slic3r::file_parser_error::m_line
private

◆ m_message

std::string Slic3r::file_parser_error::m_message
private

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