Problem debugging a test with #should:raise:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem debugging a test with #should:raise:

hernan.wilkinson
Hi all,
 I'm sending this mail to the three lists because it is an error I found in the three Smalltalks (Squeak, Pharo and Cuis) and maybe we could share the effort to solve it and the solution.
 The problem can be reproduce with this test:
test1

self
should: [ self error: 'something' ]
raise: Error
withExceptionDo: [ :anError |
self assert: 'something different' equals: anError messageText ]

 If you run that test, it will fail of course. So if you go with the debugger to the context that signals de error (self error: 'something') and press restart and then over you will find the error. In the case of Squeak and Cuis, a new debugger is opened and you can not do anything with the original one. In the case of Pharo, the debugger stops working (in another try it opened a new debugger also but I could not reproduce it).

 I think the problem is related to the execution simulation but it is not a simple problem... Any idea what it could be?

Cheers!
Hernan.

--
Hernán Wilkinson
Agile Software Development, Teaching & Coaching
Phone: +54-011-4893-2057
Twitter: @HernanWilkinson
Address: Alem 896, Floor 6, Buenos Aires, Argentina


Reply | Threaded
Open this post in threaded view
|

Re: Problem debugging a test with #should:raise:

Christoph Thiede

Hi Hernan,


thanks for the bug report! This is to some extent related to the bugs reported in this thread [1] (debuggers showing up in the wrong process), and I am currently preparing a changeset to fix these issues. Unfortunately, it does not yet resolve your issue. I have not yet investigated it in great detail, but this is probably caused by the #runUntilErrorOrReturnFrom: hack, see also this thread [2]. We still should find a patch or a better alternative to it.


Best,

Christoph


[1] http://forum.world.st/I-broke-the-debugger-td5110752.html#a5124736


Von: Squeak-dev <[hidden email]> im Auftrag von Hernan Wilkinson <[hidden email]>
Gesendet: Mittwoch, 30. Dezember 2020 14:10:05
An: Discussion of Cuis Smalltalk; The general-purpose Squeak developers list; Pharo Development List
Betreff: [squeak-dev] Problem debugging a test with #should:raise:
 
Hi all,
 I'm sending this mail to the three lists because it is an error I found in the three Smalltalks (Squeak, Pharo and Cuis) and maybe we could share the effort to solve it and the solution.
 The problem can be reproduce with this test:
test1

self
should: [ self error: 'something' ]
raise: Error
withExceptionDo: [ :anError |
self assert: 'something different' equals: anError messageText ]

 If you run that test, it will fail of course. So if you go with the debugger to the context that signals de error (self error: 'something') and press restart and then over you will find the error. In the case of Squeak and Cuis, a new debugger is opened and you can not do anything with the original one. In the case of Pharo, the debugger stops working (in another try it opened a new debugger also but I could not reproduce it).

 I think the problem is related to the execution simulation but it is not a simple problem... Any idea what it could be?

Cheers!
Hernan.

--
Hernán Wilkinson
Agile Software Development, Teaching & Coaching
Phone: +54-011-4893-2057
Twitter: @HernanWilkinson
Address: Alem 896, Floor 6, Buenos Aires, Argentina


Carpe Squeak!