Skip to content

Commit

Permalink
Print exceptions even when logging to a file (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlabelle authored Dec 14, 2023
1 parent b261b11 commit 7bbf6ff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions swiftwinrt/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,12 @@ Where <spec> is one or more of:
catch (std::exception const& e)
{
w.write("swiftwinrt : error %\n", e.what());
if (settings.log && !log_file.empty())
{
// We're logging the error to a log file,
// but also print it to simplify diagnosing build errors.
fprintf(stderr, "error: %s", e.what());
}
result = 1;
}

Expand Down

0 comments on commit 7bbf6ff

Please sign in to comment.