rendered paste body if(anagraficaSuccess && schedaSuccess){ //FTP! try { vh.ftpCopyTo(filetargListino, pathtarg, ftpSimulate); Trace.trace(Trace.DEBUG, getClass().getName(), "VirgilioFileGenerateImpl", "Listino successfully sent via FTP."); vh.ftpCopyTo(filetargScheda, pathtarg, ftpSimulate); Trace.trace(Trace.DEBUG, getClass().getName(), "VirgilioFileGenerateImpl", "Scheda successfully sent via FTP."); try { vh.updateExportTimestamp(); } catch (Exception e) { throw new TYException(e); } } catch (Exception ex) { try { vh.sendWarnings("Error while sending files to Virgilio " + ex.getMessage(), commandContext); } catch (Exception mailEx) { // ESTOCAZZO PERO` Trace.trace(Trace.ERROR, getClass().getName(),"VirgilioFileGenerateImpl", "Error while warning admins: " + mailEx.getMessage()); throw new TYException(mailEx); } throw new TYException(ex); } }else{ Trace.trace(Trace.ERROR, getClass().getName(),"VirgilioFileGenerateImpl", "EPIC FAIL"); //TODO: wtf fail }