1#ifndef MPQC_UTILITY_EXCEPTION_HPP
2#define MPQC_UTILITY_EXCEPTION_HPP
12#include "mpqc/utility/string.hpp"
25 explicit Exception(
char const *file,
long line,
const char *fmt = NULL, ...) {
28 char buffer[1024] = { };
31 vsnprintf(buffer, 1024-1, fmt, args);
33 what_ = what_ +
": " + buffer;
37 const char* what() const noexcept {
51#define MPQC_EXCEPTION(...) mpqc::Exception(__FILE__, __LINE__, __VA_ARGS__)
std::string string_cast(const T &value)
cast type T to string
Definition string.hpp:14
Contains new MPQC code since version 3.
Definition integralenginepool.hpp:37
MPQC exception class.
Definition exception.hpp:20
Exception(char const *file, long line, const char *fmt=NULL,...)
Constructs exception with an optional printf-style format and arguments.
Definition exception.hpp:25
Exception(const std::string &msg="")
Constructs exception.
Definition exception.hpp:22