pharo icon indicating copy to clipboard operation
pharo copied to clipboard

Exception>>signalIn: uses context rather than messageText as debugger title

Open emdonahue opened this issue 3 years ago • 2 comments

EDIT: The relevant class appears to be in the NewTools repository, not pharo. The issue has been opened and patch submitted at that repository instead. This can be closed.

Evaluating Exception>>signal in a playground:

Exception signal

Correctly opens a debugger with the title "Exception," which is the defaultDescription of Exception.

Evaluating instead:

Exception signalIn: thisContext

Incorrectly opens a debugger with the title "UndefinedObject>>DoIt," which is the name of the context rather than the Exception's description.

This behavior hides the actual Exception message when the debugger is opened in favor of the less useful context.

It is caused by StDebuggerActionModel>>statusStringForContext, which returns self contextPredicate printDescription rather than self exception defaultDescription. These should be swapped.

emdonahue avatar Sep 02 '22 10:09 emdonahue

Thanks for opening your first issue! Please check the CONTRIBUTING documents for some tips about which information should be provided. You can find information of how to do a Pull Request here: https://github.com/pharo-project/pharo/wiki/Contribute-a-fix-to-Pharo

GitHub
Pharo is a dynamic reflective pure object-oriented language supporting live programming inspired by Smalltalk. - Contribute a fix to Pharo · pharo-project/pharo Wiki

welcome[bot] avatar Sep 02 '22 10:09 welcome[bot]

To check, this might fix https://github.com/pharo-project/pharo/issues/10945

MarcusDenker avatar Sep 02 '22 12:09 MarcusDenker