Class LightningException

Inheritance Relationships

Base Type

  • public std::exception

Class Documentation

class LightningException : public std::exception

LightningException is the general exception thrown by PennyLane for runtime errors.

Public Functions

inline explicit LightningException(std::string err_msg) noexcept

Constructs a new LightningException exception.

Parameters

err_msg – Error message explaining the exception condition.

LightningException(const LightningException&) = default
LightningException(LightningException&&) noexcept = default
auto operator=(const LightningException&) -> LightningException& = delete
auto operator=(LightningException&&) -> LightningException& = delete
~LightningException() override = default

Destroys the LightningException object.

inline auto what() const noexcept -> const char* override

Returns a string containing the exception message. Overrides the std::exception method.

Returns

Exception message.