added moo_process_t.perr and Processor>>primError to capture the last error set by a primitive function

This commit is contained in:
hyunghwan.chung
2017-04-25 15:20:58 +00:00
parent d3c9a33c30
commit 8298bad3e0
5 changed files with 90 additions and 69 deletions

View File

@ -1,33 +1,21 @@
class(#pointer) Process(Object)
{
var initial_context, current_context, state, sp, prev, next, sem.
var initial_context, current_context, state, sp, prev, next, sem, perr.
method new
{
"instantiation is not allowed"
^nil. "TODO: raise an exception"
^nil. "TODO: raise an exception or return an error"
}
method prev
{
^self.prev.
}
method prev { ^self.prev }
method next { ^self.next }
method next
{
^self.next.
}
method next: process { self.next := process }
method prev: process { self.prev := process }
method next: process
{
self.next := process.
}
method prev: process
{
self.prev := process.
}
method primError { ^self.perr }
method resume
{