summaryrefslogtreecommitdiff
path: root/ext/rpc/java/reflect.java
diff options
context:
space:
mode:
authorSam Ruby <rubys@php.net>2000-07-08 10:35:50 +0000
committerSam Ruby <rubys@php.net>2000-07-08 10:35:50 +0000
commitee36612cef33c7b1e18dd83d54e340d5d5f455ab (patch)
tree9d16bd7c74fcb16fb911ff01c4214ee87cda5f13 /ext/rpc/java/reflect.java
parentfd3d84ee52855be0638fa313ac4daf4b63546fc7 (diff)
downloadphp-git-ee36612cef33c7b1e18dd83d54e340d5d5f455ab.tar.gz
Add experimental APIs to get and clear the last exception
Diffstat (limited to 'ext/rpc/java/reflect.java')
-rw-r--r--ext/rpc/java/reflect.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/rpc/java/reflect.java b/ext/rpc/java/reflect.java
index 0d6347cf84..35842ea939 100644
--- a/ext/rpc/java/reflect.java
+++ b/ext/rpc/java/reflect.java
@@ -88,12 +88,23 @@ public class reflect {
}
}
+ static Throwable lastException = null;
+
+ static void lastException(long result) {
+ setResult(result, lastException);
+ }
+
+ static void clearException() {
+ lastException = null;
+ }
+
static void setException(long result, Throwable e) {
if (e instanceof InvocationTargetException) {
Throwable t = ((InvocationTargetException)e).getTargetException();
if (t!=null) e=t;
}
+ lastException = e;
setException(result, e.toString().getBytes());
}