O
ohaya
Hi,
We are running a problem with some existing code that was compiled
under JDK 1.42 under 1.50_05, where it looks like the println inside
of a catch is throwing a Nullpointerexception, i.e., we have something
like:
try {
..
..
..
} catch (Exception e) {
println("The error was: " + e);
}
As a test, we added a try inside the catch, surrounding the println,
where we just printed out a fixed msg (i.e., not using the Exception:
try {
..
..
..
} catch (Exception e) {
try {
println("The error was: " + e);
} catch (Exception x){
println("An exception was thrown inside the catch");
}
}
And we did see that "An exception was thrown inside the catch" output.
This problem doesn't occur when we run this same code under an older
JRE, e.g., 1.42.
Has anyone run across this problem before? Is there some known
behavior change with the Exception class or with println that would
cause println to throw an error like that?
Thanks,
jim
We are running a problem with some existing code that was compiled
under JDK 1.42 under 1.50_05, where it looks like the println inside
of a catch is throwing a Nullpointerexception, i.e., we have something
like:
try {
..
..
..
} catch (Exception e) {
println("The error was: " + e);
}
As a test, we added a try inside the catch, surrounding the println,
where we just printed out a fixed msg (i.e., not using the Exception:
try {
..
..
..
} catch (Exception e) {
try {
println("The error was: " + e);
} catch (Exception x){
println("An exception was thrown inside the catch");
}
}
And we did see that "An exception was thrown inside the catch" output.
This problem doesn't occur when we run this same code under an older
JRE, e.g., 1.42.
Has anyone run across this problem before? Is there some known
behavior change with the Exception class or with println that would
cause println to throw an error like that?
Thanks,
jim