1. package org.apache.xml.dtm;
  2. import javax.xml.transform.SourceLocator;
  3. /**
  4. * Indicates a serious configuration error.
  5. */
  6. public class DTMConfigurationException extends DTMException {
  7. /**
  8. * Create a new <code>DTMConfigurationException</code> with no
  9. * detail mesage.
  10. */
  11. public DTMConfigurationException() {
  12. super("Configuration Error");
  13. }
  14. /**
  15. * Create a new <code>DTMConfigurationException</code> with
  16. * the <code>String </code> specified as an error message.
  17. *
  18. * @param msg The error message for the exception.
  19. */
  20. public DTMConfigurationException(String msg) {
  21. super(msg);
  22. }
  23. /**
  24. * Create a new <code>DTMConfigurationException</code> with a
  25. * given <code>Exception</code> base cause of the error.
  26. *
  27. * @param e The exception to be encapsulated in a
  28. * DTMConfigurationException.
  29. */
  30. public DTMConfigurationException(Throwable e) {
  31. super(e);
  32. }
  33. /**
  34. * Create a new <code>DTMConfigurationException</code> with the
  35. * given <code>Exception</code> base cause and detail message.
  36. *
  37. * @param e The exception to be encapsulated in a
  38. * DTMConfigurationException
  39. * @param msg The detail message.
  40. * @param e The exception to be wrapped in a DTMConfigurationException
  41. */
  42. public DTMConfigurationException(String msg, Throwable e) {
  43. super(msg, e);
  44. }
  45. /**
  46. * Create a new DTMConfigurationException from a message and a Locator.
  47. *
  48. * <p>This constructor is especially useful when an application is
  49. * creating its own exception from within a DocumentHandler
  50. * callback.</p>
  51. *
  52. * @param message The error or warning message.
  53. * @param locator The locator object for the error or warning.
  54. */
  55. public DTMConfigurationException(String message,
  56. SourceLocator locator) {
  57. super(message, locator);
  58. }
  59. /**
  60. * Wrap an existing exception in a DTMConfigurationException.
  61. *
  62. * @param message The error or warning message, or null to
  63. * use the message from the embedded exception.
  64. * @param locator The locator object for the error or warning.
  65. * @param e Any exception.
  66. */
  67. public DTMConfigurationException(String message,
  68. SourceLocator locator,
  69. Throwable e) {
  70. super(message, locator, e);
  71. }
  72. }