This is related to my other reply in the PDF reader thread and to portability of code between Smalltalks.
In VAST there are some differences how Exceptions are being handled with regard to other Smalltalks.
[ 1/ 0 ] on: Exception do: [:ex | self halt]
In VAST the ZeroDivide error will pop-up if you evaluate the code above. But as in all other Smalltalks, the exception handler should be evaluated.
Also, there is another issue. In Dolphin and in VisualWorks if I write:
[ 1/ 0 ] on: Error do: [:ex | ]
has the same effect as if I would write the following in VAST:
[ 1 / 0] on: Error do: [:ex | ex exitWith: nil].
I would be nice if the default action (in case exception is not resumable) would be the same as it is in VisualWorks and Dolphin (I think Squeak is the same), so that one does not need to send #exitWith: ...
So, for this, I have sent the following changes to support by e-mail almost a year back, but none of these changes were integrated into the latest version.
1. Exception class>>#exceptionalEvent should be as follows:
exceptionalEvent == nil
[self == Exception
ifTrue: [exceptionalEvent := ExAll]
[self == Error
ifTrue: [exceptionalEvent := ExError]
[(exceptionalEvent := ExceptionalEvent basicNew)
parent: self superclass exceptionalEvent;
description: name , ' Exception';
defaultHandler: self defaultHandlerBlock;
resumable: self isResumable "$NON-NLS$"]]].
After integrating this code you also have to reinitialize exception event object by evaluating:
2. The following change to method Signal>>#evaluate: would seem logical regarding error handling compatibility and I think would not break anything:
"Evaluate aBlock. Return if the reciever is signaled. Resume
the reciever if the execution of aBlock falls off the end."
self signalBlock: [^self].
ifTrue: [self resumeWith: (aBlock value: self)]
ifFalse: [self exitWith: (aBlock value: self)]
This base changes would make VAST compatible with Dolphin and VW. Now, would this break some existing code of another customer? That I don't know.