[Cuis-dev] question about Compiler evaluate:

Mark Volkmann r.mark.volkmann at gmail.com
Fri Jan 17 04:40:56 PST 2025


In a Workspace, if I "Do It" the first expression below and "Print It" the
second expression, it prints 3 as expected.

expression := '1 + 2'.
[ Compiler evaluate: expression ] on: Error do: [ :ex | ex inspect ].

Now if I change the 2 in expression to x and repeat, it prints
the following:

MessageNotUnderstood: UndefinedObject>>adaptToNumber:andSend:

It also writes the following to the Transcript:

UndefinedObject>>DoIt (x is Undeclared)

Looking in the Inspect window I see that none of the instance variables
contain "x is Undeclared". I really want to get that string. I've searched
the Compiler methods and haven't found a way to do this. Does anyone know
how I could access that error message?

I'd also like to prevent the error message from being written to the
Transcript so I can completely handle it in my code.

-- 
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250117/51167d15/attachment.htm>


More information about the Cuis-dev mailing list