Skip to content

Commit 25da0c4

Browse files
author
thk123
committed
Move exception loggin into souce
1 parent 518e836 commit 25da0c4

File tree

2 files changed

+23
-19
lines changed

2 files changed

+23
-19
lines changed

src/goto-symex/symex_target_equation.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,3 +721,25 @@ void symex_target_equationt::SSA_stept::output(
721721

722722
out << "Guard: " << from_expr(ns, "", guard) << '\n';
723723
}
724+
725+
std::string
726+
unwrap_exception(const std::exception &e, int level, std::string message)
727+
{
728+
// messaget message(get_message_handler());
729+
// message.error().source_location=symex.last_source_location;
730+
// message.error() << error_str << messaget::eom;
731+
message += std::string(level, ' ') + "exception: " + e.what() + "\n";
732+
try
733+
{
734+
std::rethrow_if_nested(e);
735+
}
736+
catch(const std::exception &e)
737+
{
738+
unwrap_exception(e, level + 1, message);
739+
}
740+
catch(...)
741+
{
742+
UNREACHABLE;
743+
}
744+
return message;
745+
}

src/goto-symex/symex_target_equation.h

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -332,24 +332,6 @@ inline bool operator<(
332332
std::string unwrap_exception(
333333
const std::exception &e,
334334
int level = 0,
335-
std::string message = "")
336-
{
337-
// messaget message(get_message_handler());
338-
// message.error().source_location=symex.last_source_location;
339-
// message.error() << error_str << messaget::eom;
340-
message += std::string(level, ' ') + "exception: " + e.what() + "\n";
341-
try
342-
{
343-
std::rethrow_if_nested(e);
344-
}
345-
catch(const std::exception &e)
346-
{
347-
unwrap_exception(e, level + 1, message);
348-
}
349-
catch(...)
350-
{
351-
}
352-
return message;
353-
}
335+
std::string message = "");
354336

355337
#endif // CPROVER_GOTO_SYMEX_SYMEX_TARGET_EQUATION_H

0 commit comments

Comments
 (0)