1. /*
  2. * Copyright 1999-2004 The Apache Software Foundation.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /*
  17. * $Id: DTMConfigurationException.java,v 1.4 2004/02/16 23:03:44 minchau Exp $
  18. */
  19. package com.sun.org.apache.xml.internal.dtm;
  20. import javax.xml.transform.SourceLocator;
  21. /**
  22. * Indicates a serious configuration error.
  23. */
  24. public class DTMConfigurationException extends DTMException {
  25. /**
  26. * Create a new <code>DTMConfigurationException</code> with no
  27. * detail mesage.
  28. */
  29. public DTMConfigurationException() {
  30. super("Configuration Error");
  31. }
  32. /**
  33. * Create a new <code>DTMConfigurationException</code> with
  34. * the <code>String </code> specified as an error message.
  35. *
  36. * @param msg The error message for the exception.
  37. */
  38. public DTMConfigurationException(String msg) {
  39. super(msg);
  40. }
  41. /**
  42. * Create a new <code>DTMConfigurationException</code> with a
  43. * given <code>Exception</code> base cause of the error.
  44. *
  45. * @param e The exception to be encapsulated in a
  46. * DTMConfigurationException.
  47. */
  48. public DTMConfigurationException(Throwable e) {
  49. super(e);
  50. }
  51. /**
  52. * Create a new <code>DTMConfigurationException</code> with the
  53. * given <code>Exception</code> base cause and detail message.
  54. *
  55. * @param e The exception to be encapsulated in a
  56. * DTMConfigurationException
  57. * @param msg The detail message.
  58. * @param e The exception to be wrapped in a DTMConfigurationException
  59. */
  60. public DTMConfigurationException(String msg, Throwable e) {
  61. super(msg, e);
  62. }
  63. /**
  64. * Create a new DTMConfigurationException from a message and a Locator.
  65. *
  66. * <p>This constructor is especially useful when an application is
  67. * creating its own exception from within a DocumentHandler
  68. * callback.</p>
  69. *
  70. * @param message The error or warning message.
  71. * @param locator The locator object for the error or warning.
  72. */
  73. public DTMConfigurationException(String message,
  74. SourceLocator locator) {
  75. super(message, locator);
  76. }
  77. /**
  78. * Wrap an existing exception in a DTMConfigurationException.
  79. *
  80. * @param message The error or warning message, or null to
  81. * use the message from the embedded exception.
  82. * @param locator The locator object for the error or warning.
  83. * @param e Any exception.
  84. */
  85. public DTMConfigurationException(String message,
  86. SourceLocator locator,
  87. Throwable e) {
  88. super(message, locator, e);
  89. }
  90. }