Example usage for java.lang LinkageError printStackTrace

List of usage examples for java.lang LinkageError printStackTrace

Introduction

In this page you can find the example usage for java.lang LinkageError printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:org.openconcerto.erp.core.humanresources.payroll.report.FichePayeSheet.java

public static void impression(SQLRow row) {
    final File f = getFile(row, typeOO);
    if (f.exists()) {
        try {//  www  . j av a 2s  . c o  m
            final OOConnexion ooConnexion = ComptaPropsConfiguration.getOOConnexion();
            if (ooConnexion == null) {
                return;
            }
            final Component doc = ooConnexion.loadDocument(f, true);
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("Name", PrinterNXProps.getInstance().getStringProperty("FichePayePrinter"));
            doc.printDocument(map);
            doc.close();
        } catch (LinkageError e) {
            JOptionPane.showMessageDialog(new JFrame(), "Merci d'installer OpenOffice ou LibreOffice");
        } catch (Exception e) {
            e.printStackTrace();
            ExceptionHandler.handle("Impossible de charger le document OpenOffice", e);
        }
    }
}

From source file:org.openconcerto.erp.core.humanresources.payroll.report.FichePayeSheet.java

public static void visualisation(SQLRow r, int type) {
    final File f = getFile(r, type);
    if (f.exists()) {
        try {/*from w ww.j a  v a2s.  c  om*/
            final OOConnexion ooConnexion = ComptaPropsConfiguration.getOOConnexion();
            if (ooConnexion == null) {
                return;
            }
            ooConnexion.loadDocument(f, false);
        } catch (LinkageError e) {
            JOptionPane.showMessageDialog(new JFrame(), "Merci d'installer OpenOffice ou LibreOffice");
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            ExceptionHandler.handle("Impossible de charger le document OpenOffice", e);
        }
    }
}