1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-26 05:52:06 +01:00

Better exception messages on Smack initialization

This commit is contained in:
Florian Schmaus 2018-04-04 16:42:29 +02:00
parent f48b761c33
commit f73641da5a

View file

@ -90,14 +90,14 @@ public final class SmackInitialization {
configFileStream = FileUtils.getStreamForClasspathFile(DEFAULT_CONFIG_FILE, null); configFileStream = FileUtils.getStreamForClasspathFile(DEFAULT_CONFIG_FILE, null);
} }
catch (Exception e) { catch (Exception e) {
throw new IllegalStateException(e); throw new IllegalStateException("Could not load Smack configuration file", e);
} }
try { try {
processConfigFile(configFileStream, null); processConfigFile(configFileStream, null);
} }
catch (Exception e) { catch (Exception e) {
throw new IllegalStateException(e); throw new IllegalStateException("Could not parse Smack configuration file", e);
} }
// Add the Java7 compression handler first, since it's preferred // Add the Java7 compression handler first, since it's preferred