low-exception.scm 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. ; Copyright (c) 1993-2008 by Richard Kelsey and Jonathan Rees. See file COPYING.
  2. ; This is to avoid a circular dependency: Doing this right requires
  3. ; the EXCEPTION structure, which comes (much) later.
  4. (define (error-proc . args)
  5. (debug-message "error called before it's ready"))
  6. (define (assertion-violation-proc . args)
  7. (debug-message "assertion-violation called before it's ready"))
  8. (define (implementation-restriction-violation-proc . args)
  9. (debug-message "implementation-restriction-violation called before it's ready"))
  10. (define (warning-proc . args)
  11. (debug-message "warning called before it's ready"))
  12. (define (syntax-violation-proc . args)
  13. (debug-message "syntax-violation called before it's ready"))
  14. (define (note-proc . args)
  15. (debug-message "note called before it's ready"))
  16. (define (error who message . irritants)
  17. (apply error-proc who message irritants))
  18. (define (assertion-violation who message . irritants)
  19. (apply assertion-violation-proc who message irritants))
  20. (define (implementation-restriction-violation who message . irritants)
  21. (apply implementation-restriction-violation who message irritants))
  22. (define (warning who message . irritants)
  23. (apply warning-proc who message irritants))
  24. (define (note who message . irritants)
  25. (apply note-proc who message irritants))
  26. (define (syntax-violation who message form . subforms)
  27. (apply syntax-violation-proc who message form subforms))
  28. (define (initialize-low-exception-procedures!
  29. error assertion-violation implementation-restriction-violation
  30. warning note
  31. syntax-violation)
  32. (set! error-proc error)
  33. (set! assertion-violation-proc assertion-violation)
  34. (set! implementation-restriction-violation-proc implementation-restriction-violation)
  35. (set! warning-proc warning)
  36. (set! note-proc note)
  37. (set! syntax-violation-proc syntax-violation))