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.3KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * $Id$
  3. * Copyright (C) 2001 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. public class Fop {
  9. public static void main(String[] args) {
  10. CommandLineOptions options = null;
  11. try {
  12. options = new CommandLineOptions(args);
  13. Starter starter = options.getStarter();
  14. starter.run();
  15. } catch (FOPException e) {
  16. if("null".equals("" + e.getMessage())) {
  17. System.err.println("Exception occured with a null error message");
  18. } else {
  19. System.err.println("" + e.getMessage());
  20. }
  21. if (options != null && options.getLogger().isDebugEnabled()) {
  22. e.printStackTrace();
  23. } else {
  24. System.err.println("Turn on debugging for more information");
  25. }
  26. } catch (java.io.FileNotFoundException e) {
  27. System.err.println("" + e.getMessage());
  28. if (options != null && options.getLogger().isDebugEnabled()) {
  29. e.printStackTrace();
  30. } else {
  31. System.err.println("Turn on debugging for more information");
  32. }
  33. }
  34. }
  35. }