275 |
275 |
276 !Object class methodsFor:'Signal constants'! |
276 !Object class methodsFor:'Signal constants'! |
277 |
277 |
278 abortSignal |
278 abortSignal |
279 "return the signal used to abort user actions. This signal is only |
279 "return the signal used to abort user actions. This signal is only |
280 raised if cought (by the debugger), and will lead way out of the |
280 raised if caught (by the debugger), and will lead way out of the |
281 currently active doIt/printIt or inspectIt. (also some others use |
281 currently active doIt/printIt or inspectIt. (also some others use |
282 this for a save abort)" |
282 this for a save abort)" |
283 |
283 |
284 ^ AbortSignal |
284 ^ AbortSignal |
285 ! |
285 ! |
3227 "{ Pragma: +optSpace }" |
3227 "{ Pragma: +optSpace }" |
3228 |
3228 |
3229 "recursion limit (actually: stack overflow) interrupt. |
3229 "recursion limit (actually: stack overflow) interrupt. |
3230 This interrupt is triggered, when a process stack grows above |
3230 This interrupt is triggered, when a process stack grows above |
3231 its stackLimit - usually, this leads into the debugger, but |
3231 its stackLimit - usually, this leads into the debugger, but |
3232 could be cought and the stackLimit increased in the handler. |
3232 could be caught and the stackLimit increased in the handler. |
3233 At the time we arrive here, the system has still some stack |
3233 At the time we arrive here, the system has still some stack |
3234 as a reserve so we can continue to do some useful work or cleanup or |
3234 as a reserve so we can continue to do some useful work or cleanup or |
3235 debugging for a while. |
3235 debugging for a while. |
3236 If the signal is ignored, and the stack continues to grow, there |
3236 If the signal is ignored, and the stack continues to grow, there |
3237 will be a few more chances (and more interrupts) before the VM |
3237 will be a few more chances (and more interrupts) before the VM |
3350 output a message and exit. |
3350 output a message and exit. |
3351 " |
3351 " |
3352 ('Object [error]: exit due to Signal ' , name , ' - and no debugger.') errorPrintCR. |
3352 ('Object [error]: exit due to Signal ' , name , ' - and no debugger.') errorPrintCR. |
3353 Smalltalk exit. |
3353 Smalltalk exit. |
3354 ]. |
3354 ]. |
3355 MiniDebugger enterWithMessage:'Signal cought (' , name, ')'. |
3355 MiniDebugger enterWithMessage:'Signal caught (' , name, ')'. |
3356 ^ self |
3356 ^ self |
3357 ]. |
3357 ]. |
3358 |
3358 |
3359 box := OptionBox |
3359 box := OptionBox |
3360 title:'Signal cought (' , name, ')' |
3360 title:'Signal caught (' , name, ')' |
3361 numberOfOptions:(ignorable ifTrue:[5] ifFalse:[4]). |
3361 numberOfOptions:(ignorable ifTrue:[5] ifFalse:[4]). |
3362 |
3362 |
3363 titles := #('return' 'debug' 'dump' 'exit'). |
3363 titles := #('return' 'debug' 'dump' 'exit'). |
3364 actions := Array |
3364 actions := Array |
3365 with:[badContext return] |
3365 with:[badContext return] |
5830 ErrorSignal handle:[:ex | |
5830 ErrorSignal handle:[:ex | |
5831 |
5831 |
5832 "/ a recursive error - quickly enter debugger |
5832 "/ a recursive error - quickly enter debugger |
5833 "/ this happened, when I corrupted the Dialog class ... |
5833 "/ this happened, when I corrupted the Dialog class ... |
5834 |
5834 |
5835 ('Object [error]: ' , ex errorString , ' cought in errorNotification') errorPrintCR. |
5835 ('Object [error]: ' , ex errorString , ' caught in errorNotification') errorPrintCR. |
5836 action := #debug. |
5836 action := #debug. |
5837 ex return. |
5837 ex return. |
5838 ] do:[ |
5838 ] do:[ |
5839 sender := aContext. |
5839 sender := aContext. |
5840 sender isNil ifTrue:[ |
5840 sender isNil ifTrue:[ |