List of usage examples for javax.print PrintException getLocalizedMessage
public String getLocalizedMessage()
From source file:ru.codemine.pos.service.printer.PrinterServiceTest.java
@Test public void testPrinterService() { try {/*from ww w . ja va 2s .c o m*/ Cheque cheque = new Cheque(); cheque.addItem( new Product("123456", " ? ?", "123", 1200.0), 1); cheque.addItem(new Product("1234576", " ? ", "1237", 2400.0), 1); printerService.printPlainText(new SimpleChequeTemplate(cheque).toString(), "Star-TSP100"); log.info("Printing: ok"); } catch (PrintException ex) { log.error(ex.getLocalizedMessage()); ex.printStackTrace(); } }