[armedbear-cvs] r12271 - trunk/abcl/src/org/armedbear/lisp
Erik Huelsmann
ehuelsmann at common-lisp.net
Sun Nov 8 11:28:41 UTC 2009
Author: ehuelsmann
Date: Sun Nov 8 06:28:34 2009
New Revision: 12271
Log:
Add documentation to ControlTransfer and inherit ThreadDestroyed from Error.
Modified:
trunk/abcl/src/org/armedbear/lisp/ControlTransfer.java
trunk/abcl/src/org/armedbear/lisp/ThreadDestroyed.java
Modified: trunk/abcl/src/org/armedbear/lisp/ControlTransfer.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/ControlTransfer.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/ControlTransfer.java Sun Nov 8 06:28:34 2009
@@ -33,11 +33,27 @@
package org.armedbear.lisp;
+/** This class is the parent class of all non-local transfer of
+ * control events in ABCL. The classes inheriting from this class each
+ * represent a transfer of control event as it is available in the
+ * standard: GO (represented by Go), RETURN (by Return) and THROW (by Throw).
+ *
+ * Please note that you should <b>only</b> be using these classes in case
+ * you've establisched a corresponding TAGBODY, BLOCK or CATCH-like
+ * construct in your code.
+ *
+ * Otherwise, be aware that if you are mixing Lisp and Java code,
+ * Lisp code being called into might throw one of the three exception types
+ * and cause execution to be transferred to the nearest handler - presumably
+ * outside your Java code.
+ *
+ */
abstract public class ControlTransfer extends RuntimeException
{
public ControlTransfer()
{
}
+
/**
* Overridden in order to make ControlTransfer construct
* faster. This avoids gathering stack trace information.
@@ -45,7 +61,7 @@
@Override
public Throwable fillInStackTrace()
{
- return this;
+ return this;
}
public ControlTransfer(String message)
Modified: trunk/abcl/src/org/armedbear/lisp/ThreadDestroyed.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/ThreadDestroyed.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/ThreadDestroyed.java Sun Nov 8 06:28:34 2009
@@ -33,20 +33,10 @@
package org.armedbear.lisp;
-public class ThreadDestroyed extends ControlTransfer
+public class ThreadDestroyed extends Error
{
public ThreadDestroyed()
{
}
- public ThreadDestroyed(String message)
- {
- super(message);
- }
-
- @Override
- public LispObject getCondition()
- {
- return new ControlError("Thread destroyed.");
- }
}
More information about the armedbear-cvs
mailing list