changeset 3:22d15cf94d61

fix CODETOOLS-7900885 error message for existed not well formatted result.xml file, contributed by: alexey.fedorchenko@oracle.com
author ersh
date Tue, 24 Jun 2014 14:14:28 +0400
parents 63a685efe415
children 84f3caa798b7
files src/classes/com/sun/tdk/jcov/instrument/ClassMorph.java
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/classes/com/sun/tdk/jcov/instrument/ClassMorph.java	Fri Apr 25 12:37:38 2014 -0600
+++ b/src/classes/com/sun/tdk/jcov/instrument/ClassMorph.java	Tue Jun 24 14:14:28 2014 +0400
@@ -24,6 +24,7 @@
  */
 package com.sun.tdk.jcov.instrument;
 
+import com.sun.tdk.jcov.data.FileFormatException;
 import com.sun.tdk.jcov.io.Reader;
 import com.sun.tdk.jcov.runtime.Collect;
 import com.sun.tdk.jcov.runtime.FileSaver;
@@ -511,6 +512,9 @@
 
             Collect.setSlot(r.getCount());
             r.destroy();
+        } catch (FileFormatException ffe) {
+            System.err.println("Wrong format of the output file: "+outputFile+". " +
+                    "Delete output file to receive coverage data");
         } catch (Exception e) {
             throw new Error(e);
         }