[armedbear-cvs] r13540 - trunk/abcl/src/org/armedbear/lisp
mevenson at common-lisp.net
mevenson at common-lisp.net
Sat Aug 27 23:23:07 UTC 2011
Author: mevenson
Date: Sat Aug 27 16:23:05 2011
New Revision: 13540
Log:
Pass wrapped error message to IllegalMonitorException.
Modified:
trunk/abcl/src/org/armedbear/lisp/IllegalMonitorState.java
trunk/abcl/src/org/armedbear/lisp/LispThread.java
Modified: trunk/abcl/src/org/armedbear/lisp/IllegalMonitorState.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/IllegalMonitorState.java Thu Aug 25 02:24:13 2011 (r13539)
+++ trunk/abcl/src/org/armedbear/lisp/IllegalMonitorState.java Sat Aug 27 16:23:05 2011 (r13540)
@@ -47,9 +47,23 @@
setFormatArguments(NIL);
}
+ public IllegalMonitorState(String message)
+ {
+ // This is really just an ordinary PROGRAM-ERROR, broken out into its
+ // own Java class as a convenience for the implementation.
+ super(StandardClass.PROGRAM_ERROR);
+ if (message != null) {
+ this.message = message;
+ }
+ setFormatControl(getMessage());
+ setFormatArguments(NIL);
+ }
+
+ String message = "Illegal monitor state.";
+
@Override
public String getMessage()
{
- return "Illegal monitor state.";
+ return message;
}
}
Modified: trunk/abcl/src/org/armedbear/lisp/LispThread.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/LispThread.java Thu Aug 25 02:24:13 2011 (r13539)
+++ trunk/abcl/src/org/armedbear/lisp/LispThread.java Sat Aug 27 16:23:05 2011 (r13540)
@@ -1249,7 +1249,7 @@
currentThread().processThreadInterrupts();
}
catch (IllegalMonitorStateException e) {
- return error(new IllegalMonitorState());
+ return error(new IllegalMonitorState(e.getMessage()));
}
return NIL;
}
@@ -1265,7 +1265,7 @@
currentThread().processThreadInterrupts();
}
catch (IllegalMonitorStateException e) {
- return error(new IllegalMonitorState());
+ return error(new IllegalMonitorState(e.getMessage()));
}
return NIL;
}
@@ -1284,7 +1284,7 @@
object.lockableInstance().notify();
}
catch (IllegalMonitorStateException e) {
- return error(new IllegalMonitorState());
+ return error(new IllegalMonitorState(e.getMessage()));
}
return NIL;
}
@@ -1302,7 +1302,7 @@
object.lockableInstance().notifyAll();
}
catch (IllegalMonitorStateException e) {
- return error(new IllegalMonitorState());
+ return error(new IllegalMonitorState(e.getMessage()));
}
return NIL;
}
More information about the armedbear-cvs
mailing list