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

Enable C++ exceptions on the codebase #3325

Merged
merged 1 commit into from
Sep 23, 2024

Commits on Sep 23, 2024

  1. Enable C++ exceptions on the codebase

    Jan Engelheart pointed out that with -fno-exceptions `new` failing
    will return a nullptr. Which seems fine until you realize that all
    of rpm is built on the notion that allocations never fail, they
    terminate the program instead. Only with the C++ refactorings, a
    significant portion of the code is now relying on `new` and not checking
    its return. Ooops.
    
    Uncaught exceptions will terminate an unsuspecting program anyhow,
    let that happen. We'll be adding catches over time...
    
    Besides allocations, not being able to deal with exceptions in the C++
    side of things would put us at severe handicap all over the place - they
    are an essential part of the language and STL.
    pmatilai committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    28f38c2 View commit details
    Browse the repository at this point in the history