[armedbear-devel] Changes to ConditionThrowable
Erik Huelsmann
ehuels at gmail.com
Fri Nov 6 19:49:36 UTC 2009
A very prominent item in our API is that nearly every function is
declared to throw ConditionThrowable.
Personally, I have 2 gripes with that situation:
1) ConditionThrowable is the most undescriptive name of what it actually is and
2) Since ConditionThrowable is a completely *internal* thing to ABCL,
it's wrong to expose it this way
My proposal is to:
1) Rename ConditionThrowable to ControlTransfer - which is more of a
description of what it does: it's used internal to ABCL to cause
non-local transfer of control
2) Make ControlTransfer an unchecked exception (thus derive it from
RuntimeException), because that'll allow us to keep it from being
exposed in the API.
We'll need to document in an abcl-embedding manual that callbacks
should be aware of the fact that a ControlTransfer exception may cause
the function's execution to be terminated.
For normal API use, ControlTransfer won't be seen: it'll be thrown and
consumed inside ABCL.
How about that?
Bye,
Erik.
More information about the armedbear-devel
mailing list