-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clang 18 on MacOS tests fail due to uncaught (but intentional) exceptions #1490
Milestone
Comments
This was referenced Aug 19, 2024
Merged
KrisThielemans
added a commit
to KrisThielemans/STIR-1
that referenced
this issue
Aug 25, 2024
Some tests check if errors are thrown. We caught any exception with `catch (...)`. but that fails on OSX Clang 18. Now we catch `std::runtime_error`, which is more accurate anyway. Fixes UCL#1490
KrisThielemans
added a commit
to KrisThielemans/STIR-1
that referenced
this issue
Aug 25, 2024
Some tests check if errors are thrown. We caught any exception with `catch (...)`. but that fails on OSX Clang 18. Now we catch `std::runtime_error`, which is more accurate anyway. Fixes UCL#1490
Catching
|
2 tasks
@ashgillman found possibly related llvm/llvm-project#94292 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have a few tests that check if errors are thrown, e.g.
STIR/src/test/test_DateTime.cxx
Lines 105 to 114 in 209cbb6
However, with clang18 on MacOS these tests all fail
https://github.com/UCL/STIR/actions/runs/10450627407/job/28935385772?pr=1489#step:12:751
This is pretty weird, at
catch (...)
should catch all exceptions AFAIK, so this seems like a clang bug to me.However, we know what we're throwing
STIR/src/buildblock/error.cxx
Line 62 in 209cbb6
So we could just as well (or even better) catch
std::runtime_error
.The text was updated successfully, but these errors were encountered: