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

Safer exceptions #11721

Merged
merged 6 commits into from
Aug 30, 2021
Merged

Safer exceptions #11721

merged 6 commits into from
Aug 30, 2021

Commits on Aug 30, 2021

  1. Safer exceptions

    Introduce a flexible scheme for declaring and checking which exceptions can be thrown.
    It relies on the effects as implicit capabilities pattern.
    
    The scheme is not 100% safe yet since it does not track and prevent capability capture.
    Nevertheless, it's already useful for declaring thrown exceptions and finding mismatches
    between provided and required capabilities.
    odersky committed Aug 30, 2021
    Configuration menu
    Copy the full SHA
    ffda8d0 View commit details
    Browse the repository at this point in the history
  2. Mark CanThrow @experimental

    odersky committed Aug 30, 2021
    Configuration menu
    Copy the full SHA
    623b80f View commit details
    Browse the repository at this point in the history
  3. Update MiMa filters

    odersky committed Aug 30, 2021
    Configuration menu
    Copy the full SHA
    6d67147 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6e50277 View commit details
    Browse the repository at this point in the history
  5. Go back to "capability"

    ... instead of "ability". Two reasons:
    
     - it's more standard
     - it's also more correct. According to
       https://writingexplained.org/capability-vs-ability-difference#When_to_Use_Capability
       a capability is a yes or no proposition, whereas an ability is a matter of degree.
    odersky committed Aug 30, 2021
    Configuration menu
    Copy the full SHA
    f5b8125 View commit details
    Browse the repository at this point in the history
  6. Address review comments

     - Move $throws to scala.runtime
     - Add comment
    odersky committed Aug 30, 2021
    Configuration menu
    Copy the full SHA
    9b35e0b View commit details
    Browse the repository at this point in the history