Do not discard the root exception when things go wrong
The root exception can detail an important root cause. For example with native-images it can indicate a flag you need to set for the native-image to compile correctly: Caused by: java.net.MalformedURLException: Accessing an URL protocol that was not enabled. The URL protocol http is supported but not enabled by default. It must be enabled by adding the -H:EnableURLProtocols=http option to the native-image command.
This commit is contained in:
committed by
spencergibb
parent
0e0f519570
commit
bf2c61f722
@@ -336,7 +336,7 @@ public class ConfigClientProperties {
|
||||
return result;
|
||||
}
|
||||
catch (MalformedURLException e) {
|
||||
throw new IllegalStateException("Invalid URL: " + uri);
|
||||
throw new IllegalStateException("Invalid URL: " + uri, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user