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

Support Exception#detailed_message #761

Merged
merged 3 commits into from
Dec 19, 2022

Commits on Dec 19, 2022

  1. Use Exception#detailed_message when available

    This was added in Ruby 3.2 for things like 'did_you_mean' that annotate
    existing exception messages
    
    Currently the annotations are included in Exception#message, but when
    Ruby 3.2 releases they will move to Exception#detailed_message so we
    need to use the new method to keep the existing behaviour
    imjoehaines committed Dec 19, 2022
    Configuration menu
    Copy the full SHA
    b9c7ce5 View commit details
    Browse the repository at this point in the history
  2. Support detailed_message without 'highlight'

    This shouldn't happen in practice but we should be safe to protect
    against invalid definitions of detailed_message
    
    It's also possible someone has implemented this method on Ruby versions
    < 3.2 where there isn't an expectation to have a highlight parameter as
    it wasn't a standard Exception method
    imjoehaines committed Dec 19, 2022
    Configuration menu
    Copy the full SHA
    73470ef View commit details
    Browse the repository at this point in the history
  3. Update changelog

    imjoehaines committed Dec 19, 2022
    Configuration menu
    Copy the full SHA
    8a34d93 View commit details
    Browse the repository at this point in the history