Skip to content

Commit f2742ba

Browse files
authored
Merge pull request #4993 from tautschnig/cleanup-error-message
goto-symex: Reformat parameter conversion error message
2 parents 90cefff + 0b01b29 commit f2742ba

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/goto-symex/symex_function_call.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,16 @@ void goto_symext::parameter_assignments(
116116
from_integer(0, index_type()),
117117
parameter_type);
118118
}
119+
// clang-format on
119120
else
120121
{
121122
std::ostringstream error;
122-
error << "function call: parameter \"" << identifier
123-
<< "\" type mismatch: got " << rhs.type().pretty()
124-
<< ", expected " << parameter_type.pretty();
123+
error << state.source.pc->source_location.as_string() << ": "
124+
<< "function call: parameter \"" << identifier
125+
<< "\" type mismatch:\ngot " << rhs.type().pretty()
126+
<< "\nexpected " << parameter_type.pretty();
125127
throw unsupported_operation_exceptiont(error.str());
126128
}
127-
// clang-format on
128129
}
129130

130131
assignment_typet assignment_type;

0 commit comments

Comments
 (0)