conditions.scm 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. ;;; conditions.scm --- The R6RS conditions library
  2. ;; Copyright (C) 2010, 2020 Free Software Foundation, Inc.
  3. ;;
  4. ;; This library is free software; you can redistribute it and/or
  5. ;; modify it under the terms of the GNU Lesser General Public
  6. ;; License as published by the Free Software Foundation; either
  7. ;; version 3 of the License, or (at your option) any later version.
  8. ;;
  9. ;; This library is distributed in the hope that it will be useful,
  10. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. ;; Lesser General Public License for more details.
  13. ;;
  14. ;; You should have received a copy of the GNU Lesser General Public
  15. ;; License along with this library; if not, write to the Free Software
  16. ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. (library (rnrs conditions (6))
  18. (export &condition
  19. condition
  20. simple-conditions
  21. condition?
  22. condition-predicate
  23. condition-accessor
  24. define-condition-type
  25. &message
  26. make-message-condition
  27. message-condition?
  28. condition-message
  29. &warning
  30. make-warning
  31. warning?
  32. &serious
  33. make-serious-condition
  34. serious-condition?
  35. &error
  36. make-error
  37. error?
  38. &violation
  39. make-violation
  40. violation?
  41. &assertion
  42. make-assertion-violation
  43. assertion-violation?
  44. &irritants
  45. make-irritants-condition
  46. irritants-condition?
  47. condition-irritants
  48. &who
  49. make-who-condition
  50. who-condition?
  51. condition-who
  52. &non-continuable
  53. make-non-continuable-violation
  54. non-continuable-violation?
  55. &implementation-restriction
  56. make-implementation-restriction-violation
  57. implementation-restriction-violation?
  58. &lexical
  59. make-lexical-violation
  60. lexical-violation?
  61. &syntax
  62. make-syntax-violation
  63. syntax-violation?
  64. syntax-violation-form
  65. syntax-violation-subform
  66. &undefined
  67. make-undefined-violation
  68. undefined-violation?)
  69. (import (rename (ice-9 exceptions)
  70. (&exception &condition)
  71. (make-exception condition)
  72. (simple-exceptions simple-conditions)
  73. (exception? condition?)
  74. (exception-predicate condition-predicate)
  75. (exception-accessor condition-accessor)
  76. (define-exception-type define-condition-type)
  77. (make-exception-with-message make-message-condition)
  78. (exception-with-message? message-condition?)
  79. (exception-message condition-message)
  80. (&error &serious)
  81. (make-error make-serious-condition)
  82. (error? serious-condition?)
  83. (&external-error &error)
  84. (make-external-error make-error)
  85. (external-error? error?)
  86. (&programming-error &violation)
  87. (make-programming-error make-violation)
  88. (programming-error? violation?)
  89. (&assertion-failure &assertion)
  90. (make-assertion-failure make-assertion-violation)
  91. (assertion-failure? assertion-violation?)
  92. (make-exception-with-irritants make-irritants-condition)
  93. (exception-with-irritants? irritants-condition?)
  94. (exception-irritants condition-irritants)
  95. (make-exception-with-origin make-who-condition)
  96. (exception-with-origin? who-condition?)
  97. (exception-origin condition-who)
  98. (make-non-continuable-error make-non-continuable-violation)
  99. (non-continuable-error? non-continuable-violation?)
  100. (make-implementation-restriction-error
  101. make-implementation-restriction-violation)
  102. (implementation-restriction-error?
  103. implementation-restriction-violation?)
  104. (make-lexical-error make-lexical-violation)
  105. (lexical-error? lexical-violation?)
  106. (make-syntax-error make-syntax-violation)
  107. (syntax-error? syntax-violation?)
  108. (syntax-error-form syntax-violation-form)
  109. (syntax-error-subform syntax-violation-subform)
  110. (&undefined-variable &undefined)
  111. (make-undefined-variable-error make-undefined-violation)
  112. (undefined-variable-error? undefined-violation?))))