And I get this output: [PRE] Throwing MyException2 from f() MyException2: Detail Message: 0 null at ExtraFeatures.f(ExtraFeatures.java:5) at ExtraFeatures.main(ExtraFeatures.java:20) Caught f() f() e.val(): 0 f() e.getMessage(): Detail Message: 0 null
Stop inbetween the guarded areas
Throwing MyException2 from g() MyException2: Detail Message: 0 Originated in g() at ExtraFeatures.g(ExtraFeatures.java:10) at ExtraFeatures.main(ExtraFeatures.java:30)
Throwing MyException2 from h() MyException2: Detail Message: 47 Originated in h() at ExtraFeatures.h(ExtraFeatures.java:15) at ExtraFeatures.main(ExtraFeatures.java:35) [/PRE] [ November 14, 2005: Message edited by: Jeff Albrechtsen ]
Woops, I guess that line should have used System.err as well:
The vagaries of the output are because these two streams are not tied together: they may be buffered (separately) so how they combine is not determined. Perhaps it's best to imagine (or make!) System.out and System.err write to different files.
Netbeans probalbly does not synchronize system.err and system.out reading. These streams are independent and lava.lang.Process has no way of reading data from both streams in order. So if Netbeans uses it, it can't avoid such problems.