LibrePCB Developers Documentation
Loading...
Searching...
No Matches
FileParseError Class Referencefinal

The FileParseError class. More...

#include <exceptions.h>

+ Inheritance diagram for FileParseError:
+ Collaboration diagram for FileParseError:

Public Member Functions

 FileParseError ()=delete
 Default Constructor.
 
 FileParseError (const char *file, int line, const FilePath &filePath, const QString &invalidFileContent=QString(), const QString &msg=QString("File Parse Error")) noexcept
 The constructor which is used to throw an exception.
 
 FileParseError (const FileParseError &other) noexcept
 The copy constructor (needed for clone())
 
virtual void raise () const override
 
virtual FileParseErrorclone () const override
 
- Public Member Functions inherited from RuntimeError
 RuntimeError ()=delete
 Default Constructor.
 
 RuntimeError (const char *file, int line, const QString &msg=QString("Runtime Error")) noexcept
 The default constructor.
 
 RuntimeError (const RuntimeError &other) noexcept
 The copy constructor (needed for clone())
 
virtual ~RuntimeError () noexcept
 Destructor.
 
- Public Member Functions inherited from Exception
 Exception ()=delete
 The default constructor.
 
 Exception (const Exception &other) noexcept
 The copy constructor (needed for clone())
 
 Exception (const char *file, int line, const QString &msg=QString("Exception")) noexcept
 The constructor which is used to throw an exception.
 
virtual ~Exception () noexcept
 The destructor.
 
const QString & getMsg () const
 Get the error message (translated)
 
const QString & getFile () const
 Get the source file where the exception was thrown.
 
int getLine () const
 Get the line number where the exception was thrown.
 
const char * what () const noexcept override
 reimplemented from std::exception::what()
 

Detailed Description

The FileParseError class.

This exception class is used for errors while parsing files due to invalid file content (for example invalid syntax).

See also
Exception

Constructor & Destructor Documentation

◆ FileParseError() [1/3]

FileParseError ( )
delete

Default Constructor.

+ Here is the caller graph for this function:

◆ FileParseError() [2/3]

FileParseError ( const char *  file,
int  line,
const FilePath filePath,
const QString &  invalidFileContent = QString(),
const QString &  msg = QString("File Parse Error") 
)
noexcept

The constructor which is used to throw an exception.

Parameters
fileSee librepcb::Exception::Exception()
lineSee librepcb::Exception::Exception()
filePathThe path to the parsed file (optional)
invalidFileContentThe parsed string which is invalid (optional)
msgSee Exception::Exception()

◆ FileParseError() [3/3]

FileParseError ( const FileParseError other)
noexcept

The copy constructor (needed for clone())

Member Function Documentation

◆ raise()

virtual void raise ( ) const
inlineoverridevirtual

Reimplemented from RuntimeError.

◆ clone()

virtual FileParseError * clone ( ) const
inlineoverridevirtual

Reimplemented from RuntimeError.

+ Here is the call graph for this function:

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