[armedbear-cvs] r13191 - trunk/abcl/src/org/armedbear/lisp
Erik Huelsmann
ehuelsmann at common-lisp.net
Sun Jan 30 13:20:31 UTC 2011
Author: ehuelsmann
Date: Sun Jan 30 08:20:31 2011
New Revision: 13191
Log:
Signal an error containing the name of the class, when
the type of the CLASS-LAYOUT slot isn't what it is expected to be.
Modified:
trunk/abcl/src/org/armedbear/lisp/StandardClass.java
Modified: trunk/abcl/src/org/armedbear/lisp/StandardClass.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/StandardClass.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/StandardClass.java Sun Jan 30 08:20:31 2011
@@ -132,6 +132,18 @@
public Layout getClassLayout()
{
LispObject layout = getInstanceSlotValue(symLayout);
+ if (layout == UNBOUND_VALUE)
+ return null;
+
+ if (! (layout instanceof Layout)) {
+ (new Error()).printStackTrace();
+ LispThread.currentThread().printBacktrace();
+ return (Layout)Lisp.error(Symbol.TYPE_ERROR,
+ new SimpleString("The value " + layout.writeToString()
+ + " is not of expected type " + Symbol.LAYOUT.writeToString()
+ + " in class " + this.writeToString() + "."));
+ }
+
return (layout == UNBOUND_VALUE) ? null : (Layout)layout;
}
More information about the armedbear-cvs
mailing list