Cantera 2.6.0
Public Member Functions | Static Protected Member Functions | List of all members
InputFileError Class Reference

Error thrown for problems processing information contained in an AnyMap or AnyValue. More...

#include <AnyMap.h>

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

Public Member Functions

template<typename... Args>
 InputFileError (const std::string &procedure, const AnyBase &node, const std::string &message, const Args &... args)
 Indicate an error occurring in procedure while using information from node. More...
 
template<typename... Args>
 InputFileError (const std::string &procedure, const AnyBase &node1, const AnyBase &node2, const std::string &message, const Args &... args)
 Indicate an error occurring in procedure while using information from node1 and node2. More...
 
virtual std::string getClass () const
 Method overridden by derived classes to indicate their type. More...
 
- Public Member Functions inherited from CanteraError
template<typename... Args>
 CanteraError (const std::string &procedure, const std::string &msg, const Args &... args)
 Normal Constructor for the CanteraError base class. More...
 
virtual ~CanteraError () throw ()
 Destructor for base class does nothing. More...
 
const char * what () const throw ()
 Get a description of the error. More...
 
virtual std::string getMessage () const
 Method overridden by derived classes to format the error message. More...
 

Static Protected Member Functions

static std::string formatError (const std::string &message, int line, int column, const shared_ptr< AnyMap > &metadata)
 
static std::string formatError2 (const std::string &message, int line1, int column1, const shared_ptr< AnyMap > &metadata1, int line2, int column2, const shared_ptr< AnyMap > &metadata2)
 

Additional Inherited Members

- Protected Member Functions inherited from CanteraError
 CanteraError ()
 Protected default constructor discourages throwing errors containing no information. More...
 
 CanteraError (const std::string &procedure)
 Constructor used by derived classes that override getMessage() More...
 
- Protected Attributes inherited from CanteraError
std::string procedure_
 The name of the procedure where the exception occurred. More...
 
std::string formattedMessage_
 Formatted message returned by what() More...
 

Detailed Description

Error thrown for problems processing information contained in an AnyMap or AnyValue.

This class uses the file, line, and column information stored in an AnyMap or AnyValue to provide an error message including context lines for the original user input.

Definition at line 701 of file AnyMap.h.

Constructor & Destructor Documentation

◆ InputFileError() [1/2]

InputFileError ( const std::string &  procedure,
const AnyBase node,
const std::string &  message,
const Args &...  args 
)
inline

Indicate an error occurring in procedure while using information from node.

The message and args are processed as in the CanteraError class.

Definition at line 708 of file AnyMap.h.

◆ InputFileError() [2/2]

InputFileError ( const std::string &  procedure,
const AnyBase node1,
const AnyBase node2,
const std::string &  message,
const Args &...  args 
)
inline

Indicate an error occurring in procedure while using information from node1 and node2.

The message and args are processed as in the CanteraError class.

Definition at line 721 of file AnyMap.h.

Member Function Documentation

◆ getClass()

virtual std::string getClass ( ) const
inlinevirtual

Method overridden by derived classes to indicate their type.

Reimplemented from CanteraError.

Definition at line 733 of file AnyMap.h.

◆ formatError()

std::string formatError ( const std::string &  message,
int  line,
int  column,
const shared_ptr< AnyMap > &  metadata 
)
staticprotected

Definition at line 1857 of file AnyMap.cpp.

◆ formatError2()

std::string formatError2 ( const std::string &  message,
int  line1,
int  column1,
const shared_ptr< AnyMap > &  metadata1,
int  line2,
int  column2,
const shared_ptr< AnyMap > &  metadata2 
)
staticprotected

Definition at line 1872 of file AnyMap.cpp.


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