Hi Christophe,

Sorry for my late response. You can use the following syntax to signal an
error in response to an incoming message:

protocol describe
    once: mock recv: #msg;
    signals: Error.

Note that the Error is a class not an instance.

Or alternatively you can execute an arbitrary block like Guillaume
suggested.

protocol describe
    once: mock recv: #msg;
    => [ Error signal: 'asdf' ].



--
View this message in context: 
http://forum.world.st/ANN-BabyMock-2-tp4748530p4755157.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Reply via email to