[Pharo-project] non-interactive compiling with feedback
milan.mimica at gmail.com
Mon Mar 19 14:22:50 EDT 2012
On 18 March 2012 23:20, Guillermo Polito <guillermopolito at gmail.com> wrote:
> Hmm, you can compile a method with Behavior>>#compile:notifying:
> and send an observer implementing:
> and some other stuff like #selection #deselect...
> That way you can capture the errors...
This almost works.
It doesn't raise errors for undeclared variables, instead it prompts for
| method requestor |
requestor := Mock new.
(requestor stub: #selectionInterval) returns: (1 to: 2).
requestor stub: #selectFrom:to:.
(requestor stub: #bindingOf:) returns: nil.
(requestor stub: #notify:at:in:) will: [ self halt ].
method := Compiler new compiledMethodFor: 'a:=1' in: nil to: nil notifying:
requestor proxy ifFail: nil logged: false.
I would like to catch the error. It is an error, right?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-dev