On 18 March 2012 23:20, Guillermo Polito <[email protected]> wrote:
> Hmm, you can compile a method with Behavior>>#compile:notifying: > > and send an observer implementing: > > #notify:at:in: > > 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 variable replacement. | 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. method inspect I would like to catch the error. It is an error, right? -- Milan Mimica
