Thanks to David Cok for reporting this issue.
1\.2 libcvc4:1:1:1 libcvc4parser:1:1:0 libcvc4compat:1:0:0 libcvc4bindings:1:0:0
1\.2\.1-prerelease libcvc4:1:1:1 libcvc4parser:1:1:0 libcvc4compat:1:0:0 libcvc4bindings:1:0:0
1\.3-prerelease libcvc4:1:1:1 libcvc4parser:1:1:0 libcvc4compat:1:0:0 libcvc4bindings:1:0:0
+# note: SmtEngine::setLogicString() exceptions have changed, bump library version on next release?
void SmtEngine::setLogic(const LogicInfo& logic) throw(ModalException) {
SmtScope smts(this);
-
d_logic = logic;
setLogicInternal();
}
-void SmtEngine::setLogic(const std::string& s) throw(ModalException) {
+void SmtEngine::setLogic(const std::string& s) throw(ModalException, LogicException) {
SmtScope smts(this);
-
- setLogic(LogicInfo(s));
+ try {
+ setLogic(LogicInfo(s));
+ } catch(IllegalArgumentException& e) {
+ throw LogicException(e.what());
+ }
}
-void SmtEngine::setLogic(const char* logic) throw(ModalException){
- SmtScope smts(this);
-
- setLogic(LogicInfo(string(logic)));
+void SmtEngine::setLogic(const char* logic) throw(ModalException, LogicException) {
+ setLogic(string(logic));
}
LogicInfo SmtEngine::getLogicInfo() const {
/**
* Set the logic of the script.
*/
- void setLogic(const std::string& logic) throw(ModalException);
+ void setLogic(const std::string& logic) throw(ModalException, LogicException);
/**
* Set the logic of the script.
*/
- void setLogic(const char* logic) throw(ModalException);
+ void setLogic(const char* logic) throw(ModalException, LogicException);
/**
* Set the logic of the script.
}
if(*p != '\0') {
stringstream err;
- err << "LogicInfo::setLogicString(): junk (\"" << p << "\") at end of logic string: " << logicString;
+ err << "LogicInfo::setLogicString(): ";
+ if(p == logicString) {
+ err << "cannot parse logic string: " << logicString;
+ } else {
+ err << "junk (\"" << p << "\") at end of logic string: " << logicString;
+ }
IllegalArgument(logicString, err.str().c_str());
}