1 51 package org.apache.fop.apps; 52 53 import org.apache.fop.messaging.MessageHandler; 54 55 public class Fop { 56 public static void main(String [] args) { 57 CommandLineOptions options = null; 58 59 try { 60 options = new CommandLineOptions(args); 61 Starter starter = options.getStarter(); 62 starter.run(); 63 } catch (FOPException e) { 64 MessageHandler.errorln("" + e.getMessage()); 65 if (options != null) { 66 if (options.isDebugMode().booleanValue()) { 67 e.printStackTrace(); 68 } 69 if (options.outfile != null) { 70 options.outfile.delete(); 71 } 72 } 73 System.exit(2); 74 } catch (java.io.FileNotFoundException e) { 75 MessageHandler.errorln("" + e.getMessage()); 76 if (options != null) { 77 if (options.isDebugMode().booleanValue()) { 78 e.printStackTrace(); 79 } 80 if (options.outfile != null) { 81 options.outfile.delete(); 82 } 83 } 84 System.exit(1); 85 } 86 } 87 88 } 89 90 | Popular Tags |