You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2018/01/19 16:01:52 UTC

[isis] 01/04: ISIS-1835: catches any type of exception in order to report a problem (an NPE was being thrown if the file wasn't present, rather than an IOException)

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 7ea6f2b5911751dc23f33b3325e78d219fa89695
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jan 19 14:18:31 2018 +0000

    ISIS-1835: catches any type of exception in order to report a problem (an NPE was being thrown if the file wasn't present, rather than an IOException)
---
 .../src/main/java/org/apache/isis/applib/PropertyResource.java       | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/PropertyResource.java b/core/applib/src/main/java/org/apache/isis/applib/PropertyResource.java
index 4f1c687..f701c03 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/PropertyResource.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/PropertyResource.java
@@ -18,7 +18,6 @@
  */
 package org.apache.isis.applib;
 
-import java.io.IOException;
 import java.io.InputStream;
 import java.util.Map;
 import java.util.Properties;
@@ -53,9 +52,9 @@ public class PropertyResource {
                     }
                 }
             }
-        } catch (IOException e) {
+        } catch (Exception e) {
             throw new RuntimeException(
-                    String.format("Failed to load '%s' file ", this), e);
+                    String.format("Failed to load '%s' file relative to %s", getPropertiesFile(), getPropertiesFileContext().getName()), e);
         }
     }
 }

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.