You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by ff...@apache.org on 2019/10/10 20:38:29 UTC
[karaf] branch master updated: Added more information to the thrown
exception for malformed url.
This is an automated email from the ASF dual-hosted git repository.
ffang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git
The following commit(s) were added to refs/heads/master by this push:
new e14f6b5 Added more information to the thrown exception for malformed url.
new 1d46102 Merge pull request #951 from mibesis/feature_config_installer_url
e14f6b5 is described below
commit e14f6b531905dce29c2a49d83f2ba39ff061de5f
Author: Miroslav Beranič <mi...@mibesis.si>
AuthorDate: Sat Oct 5 22:25:27 2019 +0200
Added more information to the thrown exception for malformed url.
---
.../karaf/features/internal/service/FeatureConfigInstaller.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java
index 84c8a5d..8dfc983 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java
@@ -103,7 +103,11 @@ public class FeatureConfigInstaller {
// trim lines
String val = config.getValue();
if (config.isExternal()) {
- props.load(new URL(val));
+ try {
+ props.load(new URL(val));
+ } catch (java.net.MalformedURLException e) {
+ throw new IOException("Failed to load config info from URL [" + val + "] for feature [" + feature.getName() + "/" + feature.getVersion() + "].");
+ }
} else {
props.load(new StringReader(val));
}