+
Skip to content

Conversation

mpickering
Copy link
Collaborator

Since 9.12.2, it is not sufficient to call displayException, but you must also display the exception context as well.

The topHandler now takes an argument which explains which exceptions are ones which are supposed to be displayed by the user (VerboseException CabalException or VerboseException CabalInstallException). Locations are not displayed for these exceptions.

On the other hand, an assertion failure will always print a backtrace.

Fixes #11090

Please read Github PR Conventions and then fill in one of these two templates.


Template B: This PR does not modify behaviour or interface

E.g. the PR only touches documentation or tests, does refactorings, etc.

Include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

@mpickering mpickering requested a review from philderbeast August 4, 2025 10:42
@mpickering mpickering force-pushed the wip/fix-assertion-backtrace branch 3 times, most recently from 4be22c2 to ebb6ae8 Compare August 5, 2025 10:02
Since 9.12.2, it is not sufficient to call displayException, but you
must also display the exception context as well.

The `topHandler` now takes an argument which explains which exceptions
are ones which are supposed to be displayed by the user
(`VerboseException CabalException` or `VerboseException
CabalInstallException`). Locations are not displayed for these
exceptions.

On the other hand, an assertion failure will always print a backtrace.

Fixes #11090
@mpickering mpickering force-pushed the wip/fix-assertion-backtrace branch from ebb6ae8 to d7dca69 Compare August 5, 2025 11:38
@mpickering mpickering added the merge me Tell Mergify Bot to merge label Aug 6, 2025
@mergify mergify bot added ready and waiting Mergify is waiting out the cooldown period merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days labels Aug 6, 2025
mergify bot added a commit that referenced this pull request Aug 8, 2025
@mergify mergify bot merged commit 3d16e4b into master Aug 8, 2025
96 checks passed
@mergify mergify bot deleted the wip/fix-assertion-backtrace branch August 8, 2025 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge me Tell Mergify Bot to merge ready and waiting Mergify is waiting out the cooldown period
Projects
None yet
Development

Successfully merging this pull request may close these issues.

assertion failures don't show error location when using 9.12.2
3 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载