Skip to content

Commit

Permalink
Handle bitwuzla exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanoKobalamyne committed Oct 9, 2024
1 parent 413f734 commit b98833a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion bitwuzla/src/bitwuzla_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,19 @@ void BzlaSolver::set_opt(const std::string option, const std::string value)
}
else
{
options.set(option, value);
try
{
options.set(option, value);
}
catch (const bitwuzla::Exception & exception)
{
std::string detail = exception.what();
// Remove "invalid call to 'bitwuzla::Options::set(...)'" from exception message.
detail.erase(0, detail.find(")"));
detail.erase(0, detail.find(","));
throw IncorrectUsageException("Bitwuzla backend got bad option " + option
+ detail);
}
}
}

Expand Down

0 comments on commit b98833a

Please sign in to comment.