Skip to content

Commit e9f03ee

Browse files
author
thk123
committed
Fixup Introduce nested exception printing
1 parent 0baa502 commit e9f03ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/unwrap_nested_exception.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ std::string unwrap_exception(const std::exception &e, int level)
4242
std::string nested_message = unwrap_exception(e, level + 1);
4343
// Some exception messages already end in a new line (e.g. as they have
4444
// dumped an irept. Most do not so add a new line on.
45-
if(!has_suffix(nested_message, "\n")) // TODO: replace with more C++ style
45+
if(nested_message.back() != '\n')
4646
{
4747
message_stream << '\n';
4848
}

0 commit comments

Comments
 (0)