changeset 948:32d412b1693a

runners: print user-friendly error messages when forked VM is not executable or something else goes wrong.
author shade
date Wed, 13 Aug 2014 23:37:47 +0400
parents 0234208765da
children f90aef7f1d2c
files jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java	Wed Aug 13 23:20:26 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java	Wed Aug 13 23:37:47 2014 +0400
@@ -657,8 +657,12 @@
             }
 
         } catch (IOException ex) {
+            out.println("<failed to invoke the VM, caught IOException: " + ex.getMessage() + ">");
+            out.println("");
             throw new BenchmarkException(ex);
         } catch (InterruptedException ex) {
+            out.println("<host VM has been interrupted waiting for forked VM: " + ex.getMessage() + ">");
+            out.println("");
             throw new BenchmarkException(ex);
         } finally {
             FileUtils.safelyClose(fosErr);