exception

Defines

noexcept
namespace eos
class error : public std::exception
#include <exception.h>

Base exception type for all SDK-reported exceptions.

Subclassed by eos::configuration_error, eos::invalid_argument_error, eos::invalid_vlan_error, eos::no_scoped_lock_obtained_error, eos::no_such_interface_error, eos::not_switchport_eligible_error, eos::unsupported_error

Public Functions

inline virtual ~error() noexcept
inline explicit error(std::string const &msg) noexcept
inline std::string const &msg() const noexcept
inline virtual const char *what() const noexcept
virtual void raise() const = 0

Throws this exception.

Private Members

std::string msg_
class invalid_argument_error : public eos::error
#include <exception.h>

Base exception for all cases where an attempt was made to configure the system with completely invalid arguments &#8212; for example, an out-of-range VLAN ID (>4095).

Subclassed by eos::invalid_range_error

Public Functions

inline virtual ~invalid_argument_error() noexcept
explicit invalid_argument_error(std::string const &argument_name) noexcept
explicit invalid_argument_error(std::string const &argument_name, std::string const &error_details) noexcept
inline virtual void raise() const

Throws this exception.

inline std::string argument_name() const noexcept

Private Members

std::string argument_name_
class invalid_range_error : public eos::invalid_argument_error
#include <exception.h>

The given argument was outside of the legal range of values for that argument (e.g., VLAN IDs must be between 1 and 4094).

Public Functions

inline virtual ~invalid_range_error() noexcept
explicit invalid_range_error(std::string const &argument_name, uint32_t min_valid, uint32_t max_valid) noexcept
inline virtual void raise() const

Throws this exception.

inline uint32_t min_valid() const noexcept
inline uint32_t max_valid() const noexcept

Private Members

uint32_t min_valid_
uint32_t max_valid_
class configuration_error : public eos::error
#include <exception.h>

Base exception type for all cases where the configuration requested could not be accepted because it’s impossible or invalid.

The configuration may be invalid because of other conflicting configuration. For instance if a VLAN ID is already used as an internal VLAN on a routed port, trying to manually configure this VLAN ID on a trunk port would fail until the requested VLAN ID is no longer used as an internal VLAN on the routed port.

Subclassed by eos::address_overlap_error, eos::internal_vlan_error, eos::unconfigured_agent_error

Public Functions

inline virtual ~configuration_error() noexcept
inline explicit configuration_error(std::string const &msg) noexcept
inline virtual void raise() const

Throws this exception.

class unconfigured_agent_error : public eos::configuration_error
#include <exception.h>

The given agent has not been configured.

Public Functions

inline virtual ~unconfigured_agent_error() noexcept
explicit unconfigured_agent_error(std::string const &agent_name) noexcept
inline virtual void raise() const

Throws this exception.

inline std::string agent_name() const noexcept

Private Members

std::string agent_name_
class unsupported_error : public eos::error
#include <exception.h>

Base class for “unsupported” errors.

Subclassed by eos::unsupported_policy_feature_error

Public Functions

inline virtual ~unsupported_error() noexcept
inline explicit unsupported_error(std::string const &msg) noexcept
inline virtual void raise() const

Throws this exception.

Private Members

std::string msg_
class no_scoped_lock_obtained_error : public eos::error
#include <exception.h>

The class for “No scoped lock obtained” errors.

Public Functions

inline virtual ~no_scoped_lock_obtained_error() noexcept
inline explicit no_scoped_lock_obtained_error() noexcept
inline virtual void raise() const

Throws this exception.