low-exception.scm 1.8 KB

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