allpix::InvalidKeyError

Module: Exception classes

Indicates a problem converting the value of a configuration key to the value it should represent.

#include <exceptions.h>

Inherits from allpix::ConfigurationError, allpix::Exception, std::exception

Public Functions

Name
InvalidKeyError(const std::string & key, const std::string & section, const std::string & value, const std::type_info & type, const std::string & reason)
Construct an error for a value with an invalid type.

Additional inherited members

Public Functions inherited from allpix::Exception

Name
Exception(std::string what_arg)
Creates exception with the specified problem.
const char * what() const override
Return the error message.

Protected Functions inherited from allpix::Exception

Name
Exception() =default
Internal constructor for exceptions setting the error message indirectly.

Protected Attributes inherited from allpix::Exception

Name
std::string error_message_

Public Functions Documentation

function InvalidKeyError

inline InvalidKeyError(
    const std::string & key,
    const std::string & section,
    const std::string & value,
    const std::type_info & type,
    const std::string & reason
)

Construct an error for a value with an invalid type.

Parameters:

  • key Name of the corresponding key
  • section Section where the key/value pair was defined
  • value Value as a literal string
  • type Type where the value should have been converted to
  • reason Reason why the conversion failed

Updated on 2024-12-13 at 08:31:37 +0000