base: Display ExceptionContext in WhileHandling's textual description

Changes contained in this patch

As originally-implemented the implementation for WhileHandling(displayExceptionAnnotation) would display the ExceptionContext of the exception which it carries (as this was the behavior of displayException, in terms of which displayExceptionAnnotation was implemented).

However, in 284ffab3 the definition of SomeException(displayException) was changed to exclude the ExceptionContext. This means that WhileHandling(displayExceptionAnnotation) fails to describe the provenance of the exception which it captures, greatly limiting its utility.

Return the implementation to its originally-specified behavior by implementing WhileHandling(displayExceptionAnnotation) in terms of displayExceptionWithInfo.

Fixes #27456 (closed).

MR Checklist

  • This MR solves the problem described in the following issue:
  • A changelog entry was added in changelog.d/ for user-facing changes (see changelog guide). If this MR does not need a changelog entry, the no-changelog label was applied.
  • This MR does not make any significant changes to base, or it has an accompanying CLC proposal.
  • If this MR has the potential to break user programs, the user-facing label was applied to test against head.hackage.
  • All commits are either individually buildable or squashed.
  • Commit messages describe what they do, referring to tickets using #NNNNN syntax.
  • Source comments describing the change were added. For larger changes notes and cross-references from the relevant places were added (as applicable).
  • Testcases to the testsuite were added (as applicable).
  • The users guide was updated (as applicable).

Merge request reports

Loading