musing around with the compiler
stéphane ducasse
ducasse at iam.unibe.ch
Thu Feb 17 14:02:59 UTC 2005
Hi
I would like to check whether certain string are regular Smalltalk
expressions (without evaluating them)
So I played with the compiler and its lack of consistent exceptions.
Anyway.
Compiler new compile: 'zorkgloubibolga123456789 ', 'go' in: Bot
notifying: nil ifFail: [nil]
returns
zorkgloubibolga123456789
go
while I would like to be able to get an syntaxErrorNotification or
OutOfScopeNotification since go is not an instance variable of class
Bot.
I tried
[Compiler new compile: 'zorkgloubibolga123456789 ', 'go: 120' in: Bot
notifying: nil ifFail: [nil]]
on: SyntaxErrorNotification
do: [ Beeper beep]
and there I get an exception which is good for me.
Does anybody has an idea how I can get an exception on the following
case.
[Compiler new compile: 'zorkgloubibolga123456789 ', 'go' in: Bot
notifying: nil ifFail: [nil]]
on: OutOfScopeNotification
do: [ Beeper beep]
More information about the Squeak-dev
mailing list
|