Example usage for java.util InputMismatchException getMessage

List of usage examples for java.util InputMismatchException getMessage

Introduction

In this page you can find the example usage for java.util InputMismatchException getMessage.

Prototype

public String getMessage() 

Source Link

Document

Returns the detail message string of this throwable.

Usage

From source file:com.yifanlu.PSXperiaTool.Interface.GUI.java

private void convertButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_convertButtonActionPerformed
    Runnable run = new Runnable() {
        public void run() {
            try {
                mThis.setEnabled(false);
                convertButton.setEnabled(false);
                CommandLine.verifyTitleID(titleIdInput.getText());
                setPropertiesFromFields(mSettings);
                File inputFile = new File(isoInput.getText());
                File dataDir = new File(dataInput.getText());
                File outputDir = new File(convertOutputInput.getText());
                PSXperiaTool tool = new PSXperiaTool(mSettings, inputFile, dataDir, outputDir);
                ProgressMonitor.ProgressCallback callback = new ProgressMonitor.ProgressCallback() {

                    public void nextStep(String string) {
                        convertStatus.setText(string);
                    }/*w w  w  . j  ava2 s.  c o  m*/

                    public void stepsTook(int current, int max) {
                        convertProgress.setMaximum(max);
                        convertProgress.setValue(current);
                    }
                };
                tool.setCallback(callback);
                tool.startBuild();
                convertProgress.setValue(0);
                convertButton.setEnabled(true);
                mThis.setEnabled(true);
            } catch (InputMismatchException ex) {
                Logger.error("Input error: %s", ex.getMessage());
                ex.printStackTrace();
            } catch (InterruptedException ex) {
                Logger.error(
                        "Cannot run build commands, are \"aapk\" and \"jarsigner\" in your system's PATH variable? Java says: %s",
                        ex.getMessage());
                ex.printStackTrace();
            } catch (IOException ex) {
                Logger.error("Cannot build APK! Java says: %s", ex.getMessage());
                ex.printStackTrace();
            } catch (GeneralSecurityException ex) {
                Logger.error("Error signing JAR, Java says: %s", ex.getMessage());
                ex.printStackTrace();
            } catch (SignedJarBuilder.IZipEntryFilter.ZipAbortException ex) {
                Logger.error("Error signing JAR, Java says: %s", ex.getMessage());
                ex.printStackTrace();
            } finally {
                convertProgress.setValue(0);
                convertButton.setEnabled(true);
                mThis.setEnabled(true);
            }
        }
    };
    (new Thread(run)).start();
}