Expose a channel Machine.ErrorC for errors
Expose a channel Machine.ErrorC for errors

machine.HasError() is fine for polling for errors, but it doesn't work
in a select statement. Expose a channel machine.ErrorC which gets
populated with the error when it's fired. Unlike HasError(), the channel
only ever gets the error once (and then is closed).

kballard/dcpu16