19 #ifndef __CVC4__EXCEPTION_H
20 #define __CVC4__EXCEPTION_H
39 Exception(
const std::string& msg)
throw() : d_msg(msg) {}
46 void setMessage(
const std::string& msg)
throw() { d_msg = msg; }
50 virtual const char*
what()
const throw() {
return d_msg.c_str(); }
75 virtual void toStream(std::ostream& os)
const throw() { os << d_msg; }
83 void construct(
const char* header,
const char* extra,
84 const char*
function,
const char* fmt, ...) {
87 construct(header, extra,
function, fmt, args);
91 void construct(
const char* header,
const char* extra,
92 const char*
function,
const char* fmt, va_list args);
94 void construct(
const char* header,
const char* extra,
95 const char*
function);
99 const char*
function,
const char* fmt, ...) :
103 construct(
"Illegal argument detected",
104 ( std::string(
"`") + argDesc +
"' is a bad argument"
105 + (*condStr ==
'\0' ? std::string() :
106 ( std::string(
"; expected ") +
107 condStr +
" to hold" )) ).c_str(),
108 function, fmt, args);
113 const char*
function) :
115 construct(
"Illegal argument detected",
116 ( std::string(
"`") + argDesc +
"' is a bad argument"
117 + (*condStr ==
'\0' ? std::string() :
118 ( std::string(
"; expected ") +
119 condStr +
" to hold" )) ).c_str(),
132 #if (defined(__BUILDING_CVC4LIB) || defined(__BUILDING_CVC4LIB_UNIT_TEST)) && !defined(__BUILDING_STATISTICS_FOR_EXPORT)
133 # include "util/cvc4_assert.h"
138 #ifndef CheckArgument
140 template <class T> inline
void CheckArgument(
bool cond, const T& arg, const
char* fmt, ...) {
141 if(__builtin_expect( ( !cond ),
false )) { \
142 throw ::CVC4::IllegalArgumentException(
"",
"",
""); \
147 if(__builtin_expect( ( !cond ),
false )) { \
148 throw ::CVC4::IllegalArgumentException(
"",
"",
""); \
153 #ifndef DebugCheckArgument
156 if(__builtin_expect( ( !cond ),
false )) { \
157 throw ::CVC4::IllegalArgumentException(
"",
"",
""); \
162 if(__builtin_expect( ( !cond ),
false )) { \
163 throw ::CVC4::IllegalArgumentException(
"",
"",
""); \
IllegalArgumentException(const char *condStr, const char *argDesc, const char *function)
void DebugCheckArgument(bool cond, const T &arg, const char *fmt,...)
virtual void toStream(std::ostream &os) const
Printing: feel free to redefine toStream().
void CheckArgument(bool cond, const T &arg, const char *fmt,...)
IllegalArgumentException(const char *condStr, const char *argDesc, const char *function, const char *fmt,...)
Exception(const char *msg)
void construct(const char *header, const char *extra, const char *function, const char *fmt,...)
Exception(const std::string &msg)
std::string getMessage() const
This is CVC4 release version For build and installation please see the INSTALL file included with this distribution This first official release of CVC4 is the result of more than three years of efforts by researchers at New York University and The University of Iowa The project leaders are Clark please refer to the AUTHORS file in the source distribution CVC4 is a tool for determining the satisfiability of a first order formula modulo a first order CVC CVC3 but does not directly incorporate code from any previous version CVC4 is intended to be an open and extensible SMT engine It can be used as a stand alone tool or as a library It has been designed to increase the performance and reduce the memory overhead of its predecessors It is written entirely in C and is released under a free software see the INSTALL file that comes with this distribution We recommend that you visit our CVC4 tutorials online please write to the cvc users cs nyu edu mailing list *if you need to report a bug with CVC4
Macros that should be defined everywhere during the building of the libraries and driver binary...
IllegalArgumentException()
void setMessage(const std::string &msg)
std::ostream & operator<<(std::ostream &out, ModelFormatMode mode)
std::string toString() const
Get this exception as a string.
virtual const char * what() const