method := Smalltalk compiler
class: UndefinedObject;
options: #(+ optionParseErrors);
compile: 'errorMethod ^1+'.
method valueWithReceiver: nil arguments: #()
This is really compiled to raise a syntax error at runtime. see
OCASTTranslator>>#visitParseErrorNode: anErrorNode
methodBuilder
pushLiteralVariable: #error -> anErrorNode asSyntaxErrorNotification;
send: #signal.
with
RBParseErrorNode>>#asSyntaxErrorNotification
^SyntaxErrorNotification new
setClass: self methodNode methodClass
category: nil
code: self methodNode source
doitFlag: false
errorMessage: errorMessage
location: self start
Marcus