allpix::InvalidCombinationError

Module: Exception classes

Indicates an error with a combination of configuration keys. More…

#include <exceptions.h>

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

Public Functions

Name
InvalidCombinationError(const Configuration & config, std::initializer_list< std::string > keys, const std::string & reason ="")
Construct an error for an invalid combination of keys.

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_

Detailed Description

class allpix::InvalidCombinationError;

Indicates an error with a combination of configuration keys.

Should be raised if a disallowed combination of keys is used, such as two optional parameters which cannot be used at the same time because they contradict each other.

Public Functions Documentation

function InvalidCombinationError

InvalidCombinationError(
    const Configuration & config,
    std::initializer_list< std::string > keys,
    const std::string & reason =""
)

Construct an error for an invalid combination of keys.

Parameters:

  • config Configuration object containing the problematic key combination
  • keys List of names of the conflicting keys
  • reason Reason why the key combination is invalid (empty if no explicit reason)

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