Class LightningException¶
Defined in File Error.hpp
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.
-
inline explicit LightningException(std::string err_msg) noexcept¶
api/classPennylane_1_1Util_1_1LightningException
Download Python script
Download Notebook
View on GitHub