Skip to content
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

Add fail_fast runtime error policy #210

Merged
merged 3 commits into from
Sep 10, 2024
Merged

Add fail_fast runtime error policy #210

merged 3 commits into from
Sep 10, 2024

Conversation

tcbrindle
Copy link
Owner

This adds a new fail_fast runtime error policy to go with our existing terminate and unwind policies.

As the name suggests, fail_fast is intended to tear down the process in the fastest way possible should a runtime error occur. It uses __builtin_trap() on GCC and Clang, the __fastfail() intrinsic on MSVC, and otherwise falls back to std::abort(). Unlike the terminate policy, it never attempts to print a message to stderr.

This adds a new fail_fast runtime error policy to go with our existing terminate and unwind policies.

As the name suggests, fail_fast is intended to tear down the process in the fastest way possible should a runtime error occur. It uses `__builtin_trap()` on GCC and Clang, the `__fastfail()` intrinsic on MSVC, and otherwise falls back to `std::abort()`. Unlike the terminate policy, it never attempts to print a message to stderr.
Copy link

codecov bot commented Sep 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.81%. Comparing base (291df6d) to head (c08e6d6).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #210      +/-   ##
==========================================
- Coverage   98.81%   98.81%   -0.01%     
==========================================
  Files          69       69              
  Lines        2534     2523      -11     
==========================================
- Hits         2504     2493      -11     
  Misses         30       30              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tcbrindle tcbrindle merged commit fa983e5 into main Sep 10, 2024
39 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant