cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robby Pelssers, AGP" <robby.pelss...@agp.nl>
Subject how to catch and throw exceptions in cocoon2.1.10 (javascript)
Date Tue, 09 Jan 2007 16:10:30 GMT
Hi,
 
I'm facing a problem that my old javascript file no longer works properly
with constructions like instanceof, getClass(), throw.   Can someone point
me out how to do this?
 
try {
} catch (ex) {
    if (ex  instanceof Packages.xxxx.xxxx.xxxx) {
        //Do something 1
    } else if (ex.getClass().getName().equals("xxxx")) {
        //Do something 2
    }  else {
        //Do something 3
        throw(ex);
    }
}
 
Cheers,
Robby Pelssers


Mime
View raw message