You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Fop.java 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * $Id$
  3. * Copyright (C) 2001-2003 The Apache Software Foundation. All rights reserved.
  4. * For details on use and redistribution please refer to the
  5. * LICENSE file included with these sources.
  6. */
  7. package org.apache.fop.apps;
  8. /*
  9. * The main application class for the FOP command line interface (CLI).
  10. */
  11. public class Fop {
  12. /*
  13. * The main routine for the command line interface
  14. * @param args the command line parameters
  15. */
  16. public static void main(String[] args) {
  17. CommandLineOptions options = null;
  18. try {
  19. options = new CommandLineOptions(args);
  20. Starter starter = options.getStarter();
  21. starter.run();
  22. } catch (FOPException e) {
  23. if (e.getMessage()==null) {
  24. System.err.println("Exception occured with a null error message");
  25. } else {
  26. System.err.println("" + e.getMessage());
  27. }
  28. if (options != null && options.getLogger().isDebugEnabled()) {
  29. e.printStackTrace();
  30. } else {
  31. System.err.println("Turn on debugging for more information");
  32. }
  33. } catch (java.io.FileNotFoundException e) {
  34. System.err.println("" + e.getMessage());
  35. if (options != null && options.getLogger().isDebugEnabled()) {
  36. e.printStackTrace();
  37. } else {
  38. System.err.println("Turn on debugging for more information");
  39. }
  40. }
  41. }
  42. }