Function Pennylane::Util::Abort(const std::string&, const char *, int, const char *)

Function Documentation

inline void Pennylane::Util::Abort(const std::string &message, const char *file_name, int line, const char *function_name)

Throws a LightningException with the given error message.

This function should not be called directly - use one of the PL_ASSERT() or PL_ABORT() macros, which provide the source location at compile time.

Parameters
  • message – string literal describing the error

  • file_name – source file where error occurred

  • line – line of source file

  • function_name – function in which error occurred