commit 178552b3c50b5f555dc70b40eac8db3d05f255de
parent 74eed4ccefd6fed230f6ea6804bed172f3a75e2d
Author: Tomas Hlavaty <tom@logand.com>
Date: Sun, 22 Jan 2012 19:40:45 +0100
2java pr_exception improved
Diffstat:
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/unoidl2java.c b/unoidl2java.c
@@ -424,13 +424,27 @@ static void pr_exception(Any x) {
pr(" public "); pp(name); pl("() {");
pr_default_slots(body);
pl(" }");
- pr(" public "); pp(name); pl("(java.lang.String Message) {");
- pl(" super(Message);");
- // TODO init default slots
+ pr(" public "); pp(name); pl("(java.lang.String m) {");
+ pl(" super(m);");
+ pr_default_slots(body);
pl(" }");
- pr(" public "); pp(name); pr("(java.lang.String Message, java.lang.Object Object"); /* TODO additional slot args see CannotConvertException */ pl(") {");
- pl(" super(Message, Object);");
+ pr(" public "); pp(name); pr("(java.lang.String m, java.lang.Object o) {");
+ pl(" super(m, o);");
+ pr_default_slots(body);
pl(" }");
+ if(NIL != body) {
+ pr(" public "); pp(name);
+ pr("(java.lang.String Message, java.lang.Object Context,");
+ pr_args(body);
+ pl(") {");
+ pl(" super(Message, Context);");
+ for(Any y = body; NIL != y; y = cdr(y)) {
+ Any slot = car(y);
+ Any n = car(slot);
+ pr(" this."); pp(n); pr(" = "); pp(n); pl(";");
+ }
+ pl(" }");
+ }
pr_TypeInfo(body);
}
pl("}");