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

madhan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git


The following commit(s) were added to refs/heads/master by this push:
     new 5180245f0 RANGER-5338: Make XMLUtils's error message more informative 
(#685)
5180245f0 is described below

commit 5180245f04a8677b4ffb955325a80d43ccbef561
Author: Shohei Okumiya <[email protected]>
AuthorDate: Tue Nov 4 01:16:23 2025 +0900

    RANGER-5338: Make XMLUtils's error message more informative (#685)
---
 .../src/main/java/org/apache/ranger/plugin/util/XMLUtils.java        | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/agents-common/src/main/java/org/apache/ranger/plugin/util/XMLUtils.java 
b/agents-common/src/main/java/org/apache/ranger/plugin/util/XMLUtils.java
index 553f248bd..7a84401c5 100644
--- a/agents-common/src/main/java/org/apache/ranger/plugin/util/XMLUtils.java
+++ b/agents-common/src/main/java/org/apache/ranger/plugin/util/XMLUtils.java
@@ -51,7 +51,7 @@ public static void loadConfig(String configFileName, 
Map<Object, Object> propert
         try (InputStream input = getFileInputStream(configFileName)) {
             loadConfig(input, properties);
         } catch (Exception e) {
-            LOG.error("Error loading : ", e);
+            LOG.error("Error loading : {}", configFileName, e);
         }
     }
 
@@ -135,6 +135,9 @@ private static InputStream getFileInputStream(String path) 
throws FileNotFoundEx
             }
         }
 
+        if (ret == null) {
+            throw new FileNotFoundException(path + " is not found");
+        }
         return ret;
     }
 }

Reply via email to