StyleSheetExceptions.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $TOG: StyleSheetExceptions.h /main/4 1998/04/17 11:49:51 mgreess $ */
  24. #ifndef _StyleSheetExceptions_h
  25. #define _StyleSheetExceptions_h
  26. #include "dti_excs/Exceptions.hh"
  27. #include "SymTab.h"
  28. #define CASTEXCEPT
  29. #define CASTBCEXCEPT
  30. #define CASTBEEXCEPT
  31. #define CASTDPEXCEPT
  32. #define CASTDPUCEXCEPT
  33. #define CASTDPUTEXCEPT
  34. #define CASTDPUDEXCEPT
  35. #define CASTDPUEEXCEPT
  36. #define CASTSSEXCEPT
  37. #define CASTSSSEEXCEPT
  38. #define CASTUAEXCEPT
  39. #define CASTUTEXCEPT
  40. #define CASTUVEXCEPT
  41. class StyleSheetException : public Exception
  42. {
  43. public:
  44. DECLARE_EXCEPTION(StyleSheetException, Exception)
  45. virtual ~StyleSheetException();
  46. };
  47. class StyleSheetSyntaxError : public StyleSheetException
  48. {
  49. public:
  50. DECLARE_EXCEPTION(StyleSheetSyntaxError, StyleSheetException)
  51. };
  52. class badEvaluationException : public StyleSheetException
  53. {
  54. public:
  55. DECLARE_EXCEPTION(badEvaluationException, StyleSheetException)
  56. virtual ~badEvaluationException();
  57. };
  58. class badCastException : public StyleSheetException
  59. {
  60. public:
  61. DECLARE_EXCEPTION(badCastException, StyleSheetException)
  62. };
  63. class undefinedVariableException : public badEvaluationException
  64. {
  65. public:
  66. DECLARE_EXCEPTION(undefinedVariableException, badEvaluationException)
  67. undefinedVariableException(const Symbol &v)
  68. : badEvaluationException(),
  69. f_variable_name(v)
  70. {}
  71. private:
  72. Symbol f_variable_name;
  73. };
  74. class undefinedAttributeException : public badEvaluationException
  75. {
  76. public:
  77. DECLARE_EXCEPTION(undefinedAttributeException, badEvaluationException)
  78. undefinedAttributeException(const Symbol &a)
  79. : badEvaluationException(),
  80. f_attribute_name(a)
  81. {}
  82. private:
  83. Symbol f_attribute_name;
  84. };
  85. class docParserException : public Exception
  86. {
  87. public:
  88. DECLARE_EXCEPTION(docParserException, Exception)
  89. };
  90. class unknownTagException : public docParserException
  91. {
  92. public:
  93. DECLARE_EXCEPTION(unknownTagException, docParserException)
  94. };
  95. class docParserUnexpectedCharacter : public docParserException
  96. {
  97. public:
  98. DECLARE_EXCEPTION(docParserUnexpectedCharacter, docParserException)
  99. };
  100. class docParserUnexpectedTag : public docParserException
  101. {
  102. public:
  103. DECLARE_EXCEPTION(docParserUnexpectedTag, docParserException)
  104. };
  105. class docParserUnexpectedData : public docParserException
  106. {
  107. public:
  108. DECLARE_EXCEPTION(docParserUnexpectedData, docParserException)
  109. };
  110. class docParserUnexpectedEof : public docParserException
  111. {
  112. public:
  113. DECLARE_EXCEPTION(docParserUnexpectedEof, docParserException)
  114. };
  115. #endif /* _StyleSheetExceptions_h */
  116. /* DO NOT ADD ANY LINES AFTER THIS #endif */