exceptions.scm 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. ;;; Guile exceptions
  2. ;;; Copyright (C) 2024 David Thompson <dave@spritely.institute>
  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. ;;; Commentary:
  16. ;;;
  17. ;;; Guile exceptions module.
  18. ;;;
  19. ;;; Code:
  20. (define-module (ice-9 exceptions)
  21. #:pure
  22. #:use-module (hoot error-handling)
  23. #:use-module (hoot errors)
  24. #:use-module (hoot exceptions)
  25. ;; Exported in upstream (ice-9 exceptions), but can't export in Hoot
  26. ;; due to duplicate export errors:
  27. ;;
  28. ;; &exception
  29. ;; make-exception
  30. ;; exception?
  31. ;; simple-exceptions
  32. ;; raise-exception
  33. ;; &error
  34. ;; &non-continuable
  35. ;; with-exception-handler
  36. ;;
  37. ;; Commented lines refer to things that either Hoot doesn't have or
  38. ;; has... but is using a different name, like
  39. ;; make-assertion-violation instead of make-assertion-failure.
  40. #:re-export (
  41. ;; make-exception-type
  42. ;; exception-type?
  43. ;; exception-predicate
  44. ;; exception-accessor
  45. ;; exception-kind
  46. ;; exception-args
  47. &message
  48. make-exception-with-message
  49. exception-with-message?
  50. exception-message
  51. &warning
  52. make-warning
  53. warning?
  54. make-error
  55. error?
  56. &external-error
  57. make-external-error
  58. external-error?
  59. ;; &quit-exception
  60. make-quit-exception
  61. quit-exception?
  62. ;; &programming-error
  63. make-programming-error
  64. programming-error?
  65. ;; &assertion-failure
  66. ;; make-assertion-failure
  67. ;; assertion-failure?
  68. &irritants
  69. make-exception-with-irritants
  70. exception-with-irritants?
  71. exception-irritants
  72. &origin
  73. make-exception-with-origin
  74. exception-with-origin?
  75. exception-origin
  76. ;; make-non-continuable-error
  77. ;; non-continuable-error?
  78. &implementation-restriction
  79. ;; make-implementation-restriction-error
  80. ;; implementation-restriction-error?
  81. &lexical
  82. ;; make-lexical-error
  83. ;; lexical-error?
  84. ;; &syntax
  85. ;; make-syntax-error
  86. ;; syntax-error?
  87. ;; syntax-error-form
  88. ;; syntax-error-subform
  89. ;; &undefined-variable
  90. ;; make-undefined-variable-error
  91. ;; undefined-variable-error?
  92. define-exception-type
  93. raise-continuable
  94. guard))