redefined Apex>primitiveFailed

This commit is contained in:
hyunghwan.chung 2016-05-02 13:59:28 +00:00
parent 389203b6e4
commit 93872bd81d
3 changed files with 22 additions and 7 deletions

View File

@ -219,13 +219,10 @@
## ------------------------------------------------------- ## -------------------------------------------------------
## ------------------------------------------------------- ## -------------------------------------------------------
#method(#class) primitiveFailed ## #method(#class) primitiveFailed
{ ## {
## TODO: implement this ## this method will be added after Exception class has been defined.
## PrimitiveFailureError signal. ## }
self dump.
'primitive failed' dump.
}
#method primitiveFailed #method primitiveFailed
{ {

View File

@ -390,3 +390,17 @@ Processor activeProcess terminate.
self signal: 'no such message'. self signal: 'no such message'.
} }
} }
#extend Apex
{
#method(#class) primitiveFailed
{
## TODO: implement this
## PrimitiveFailureError signal.
self dump.
##'primitive failed' dump.
# TODO: define a specialized exception class for primitive failure and use it.
Exception signal: 'PRIMITIVE FAILED...'.
}
}

View File

@ -168,6 +168,10 @@
## self test12. ## self test12.
##100 timesRepeat: ['>>>>> END OF MAIN' dump]. ##100 timesRepeat: ['>>>>> END OF MAIN' dump].
## the following line(return:to:) must cause primitive failure...
##[ Processor return: 10 to: 20. ] on: Exception do: [:ex | ex messageText dump].
'>>>>> END OF MAIN' dump. '>>>>> END OF MAIN' dump.
} }
} }