unoidl2

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/unoidl2.git/
Log | Files | Refs

commit 434b75310d964c62982cf7b9e00491e3b84adbaa
parent 799846c25b5884eef3c13ad8d2d659b086e1e0f7
Author: Tomas Hlavaty <tom@logand.com>
Date:   Sat, 17 Dec 2011 17:40:46 +0100

pr_exception 2java fix

Diffstat:
Munoidl2java.c | 18+++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/unoidl2java.c b/unoidl2java.c @@ -185,19 +185,31 @@ static void pr_exception(Any x) { } int root = equal(name, Exception) && equal(module, uno_star_sun_com); if(root) - pr(" extends java.lang.Exception"); + pr(" extends java.lang.RuntimeException"); // TODO really RuntimeException? pl(" { // exception"); for(Any y = body; !null(y); y = cdr(y)) { Any slot = car(y); - pr(" "); pp(cadr(slot)); pr(" _"); pp(car(slot)); pl(";"); + pr(" "); pp(cadr(slot)); pr(" _"); pp(car(slot)); pl(";"); } - if(root) { // TODO + if(root) { + pl(" public Exception() {"); + pl(" }"); + pl(" public Exception(java.lang.String _Message) {"); + pl(" this._Message = _Message;"); + pl(" }"); pr(" public "); pp(name); pr("("); pr_args(body); pl(") {"); for(Any y = body; !null(y); y = cdr(y)) { Any slot = car(y); pr(" this._"); pp(car(slot)); pr(" = _"); pp(car(slot)); pl(";"); } pl(" }"); + } else { + pr(" public "); pp(name); pl("() {"); + pl(" super();"); + pl(" }"); + pl(" public "); pp(name); pl("(java.lang.String _Message) {"); + pl(" super(_Message);"); + pl(" }"); } pl("}"); }