OpenMS
Loading...
Searching...
No Matches
MzPAFParseError Class Reference

Parse error for mzPAF notation. More...

#include <OpenMS/CHEMISTRY/MzPAF.h>

Inheritance diagram for MzPAFParseError:
[legend]
Collaboration diagram for MzPAFParseError:
[legend]

Public Member Functions

 MzPAFParseError (const char *file, int line, const char *function, MzPAFErrorCode error_code, size_t error_position, const String &input, const String &message) noexcept
 
MzPAFErrorCode getErrorCode () const noexcept
 
size_t getPosition () const noexcept
 
String getFormattedMessage () const
 
- Public Member Functions inherited from ParseError
 ParseError (const char *file, int line, const char *function, const std::string &expression, const std::string &message) noexcept
 
- Public Member Functions inherited from BaseException
 BaseException () noexcept
 Default constructor.
 
 BaseException (const char *file, int line, const char *function) noexcept
 Constructor.
 
 BaseException (const char *file, int line, const char *function, const std::string &name, const std::string &message) noexcept
 Constructor.
 
 BaseException (const BaseException &exception) noexcept
 Copy constructor.
 
 ~BaseException () noexcept override
 Destructor.
 
const char * getName () const noexcept
 Returns the name of the exception.
 
int getLine () const noexcept
 Returns the line number where it occurred.
 
const char * getFile () const noexcept
 Returns the file where it occurred.
 
const char * getFunction () const noexcept
 Returns the function where it occurred.
 
const char * getMessage () const noexcept
 Returns the message.
 

Private Member Functions

void extractContext_ (const String &input, size_t pos)
 

Private Attributes

MzPAFErrorCode code_
 
size_t position_
 
String context_before_
 
String context_after_
 

Additional Inherited Members

- Protected Attributes inherited from BaseException
const char * file_
 The source file the exception was thrown in.
 
int line_
 The line number the exception was thrown in.
 
const char * function_
 The source file the exception was thrown in.
 
std::string name_
 The name of the exception.
 

Detailed Description

Parse error for mzPAF notation.

Constructor & Destructor Documentation

◆ MzPAFParseError()

MzPAFParseError ( const char *  file,
int  line,
const char *  function,
MzPAFErrorCode  error_code,
size_t  error_position,
const String input,
const String message 
)
noexcept

Member Function Documentation

◆ extractContext_()

void extractContext_ ( const String input,
size_t  pos 
)
private

◆ getErrorCode()

MzPAFErrorCode getErrorCode ( ) const
inlinenoexcept

◆ getFormattedMessage()

String getFormattedMessage ( ) const

◆ getPosition()

size_t getPosition ( ) const
inlinenoexcept

Member Data Documentation

◆ code_

MzPAFErrorCode code_
private

◆ context_after_

String context_after_
private

◆ context_before_

String context_before_
private

◆ position_

size_t position_
private