Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::file_parser_error Class Reference

#include <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
16 :
17 Slic3r::RuntimeError(format_what(msg, file, line)),
18 m_message(msg), m_filename(file), m_line(line) {}
std::string m_filename
Definition FileParserError.hpp:35
static std::string format_what(const std::string &msg, const std::string &file, unsigned long l)
Definition FileParserError.hpp:39
unsigned long m_line
Definition FileParserError.hpp:36
std::string m_message
Definition FileParserError.hpp:34
unsigned long line() const
Definition FileParserError.hpp:31

◆ 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
19 :
20 Slic3r::RuntimeError(format_what(msg, file.string(), line)),
21 m_message(msg), m_filename(file.string()), m_line(line) {}

◆ ~file_parser_error()

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

Member Function Documentation

◆ filename()

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

References m_filename.

◆ format_what()

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

◆ line()

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

References m_line.

◆ message()

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

References m_message.

Member Data Documentation

◆ m_filename

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

Referenced by filename().

◆ m_line

unsigned long Slic3r::file_parser_error::m_line
private

Referenced by line().

◆ m_message

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

Referenced by message().


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