Use try/multi-catch in Main

This commit is contained in:
Florian Schmaus 2018-11-08 14:17:49 +01:00
parent f819102ca7
commit 4358b9c158

View file

@ -1,11 +1,15 @@
package de.vanitasvitae.omemoqrgenerator; package de.vanitasvitae.omemoqrgenerator;
import java.io.IOException;
import java.util.Map; import java.util.Map;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import org.jivesoftware.smack.SmackConfiguration; import org.jivesoftware.smack.SmackConfiguration;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.tcp.XMPPTCPConnection; import org.jivesoftware.smack.tcp.XMPPTCPConnection;
import org.jivesoftware.smackx.omemo.exceptions.CorruptedOmemoKeyException;
import org.jivesoftware.smackx.omemo.internal.OmemoDevice; import org.jivesoftware.smackx.omemo.internal.OmemoDevice;
import org.jivesoftware.smackx.omemo.trust.OmemoFingerprint; import org.jivesoftware.smackx.omemo.trust.OmemoFingerprint;
@ -123,8 +127,7 @@ public class Main extends Application implements LoginCallback {
stage.setTitle("OMEMO QR-Code Generator"); stage.setTitle("OMEMO QR-Code Generator");
stage.setScene(scene); stage.setScene(scene);
stage.show(); stage.show();
} catch (Exception e) { } catch (InterruptedException | XMPPException | SmackException | IOException | CorruptedOmemoKeyException e) {
e.printStackTrace();
LOGGER.log(Level.SEVERE, "Exception in login", e); LOGGER.log(Level.SEVERE, "Exception in login", e);
} }
} }