From d3b5cde166fad352ba499ccd16fc9eb734975571 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Fri, 18 Sep 2009 18:09:11 +0000 Subject: [PATCH] improved the error handling git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@21858 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/XmlFile.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/main/java/hudson/XmlFile.java b/core/src/main/java/hudson/XmlFile.java index da450cf4cd..6ed07f8083 100644 --- a/core/src/main/java/hudson/XmlFile.java +++ b/core/src/main/java/hudson/XmlFile.java @@ -128,6 +128,8 @@ public final class XmlFile { throw new IOException2("Unable to read "+file,e); } catch(ConversionException e) { throw new IOException2("Unable to read "+file,e); + } catch(Error e) {// mostly reflection errors + throw new IOException2("Unable to read "+file,e); } finally { r.close(); } @@ -148,6 +150,8 @@ public final class XmlFile { throw new IOException2(e); } catch(ConversionException e) { throw new IOException2("Unable to read "+file,e); + } catch(Error e) {// mostly reflection errors + throw new IOException2("Unable to read "+file,e); } finally { r.close(); }