more robust capture of java errors