[armedbear-cvs] r12512 - trunk/abcl/src/org/armedbear/lisp
Ville Voutilainen
vvoutilainen at common-lisp.net
Sun Feb 28 15:54:19 UTC 2010
Author: vvoutilainen
Date: Sun Feb 28 10:54:17 2010
New Revision: 12512
Log:
Make Condition.writeToString() final, add documentation to
Condition.getMessage(), fix remaining overrides of Condition.writeToString()
to override Condition.getMessage() instead.
Modified:
trunk/abcl/src/org/armedbear/lisp/CellError.java
trunk/abcl/src/org/armedbear/lisp/Condition.java
trunk/abcl/src/org/armedbear/lisp/EndOfFile.java
Modified: trunk/abcl/src/org/armedbear/lisp/CellError.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/CellError.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/CellError.java Sun Feb 28 10:54:17 2010
@@ -98,10 +98,10 @@
}
@Override
- public String writeToString()
+ public String getMessage()
{
if (Symbol.PRINT_ESCAPE.symbolValue() == NIL)
- return super.writeToString();
+ return super.getMessage();
StringBuffer sb = new StringBuffer(typeOf().writeToString());
sb.append(' ');
sb.append(getCellName().writeToString());
Modified: trunk/abcl/src/org/armedbear/lisp/Condition.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Condition.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/Condition.java Sun Feb 28 10:54:17 2010
@@ -129,9 +129,13 @@
setInstanceSlotValue(Symbol.FORMAT_ARGUMENTS, formatArguments);
}
+ /**
+ * Extending classes should override this method if they want to
+ * customize how they will be printed.
+ */
public String getMessage()
{
- return message;
+ return getFormatControl().toString();
}
@Override
@@ -176,7 +180,7 @@
}
@Override
- public String writeToString()
+ public final String writeToString()
{
final LispThread thread = LispThread.currentThread();
if (Symbol.PRINT_ESCAPE.symbolValue(thread) == NIL)
Modified: trunk/abcl/src/org/armedbear/lisp/EndOfFile.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/EndOfFile.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/EndOfFile.java Sun Feb 28 10:54:17 2010
@@ -72,7 +72,7 @@
}
@Override
- public String writeToString()
+ public String getMessage()
{
return unreadableString(Symbol.END_OF_FILE);
}
More information about the armedbear-cvs
mailing list