;;;; standard-conditions.scm -*- Scheme -*- ;;;; Kon Lovett, Jul '18 ;;;; Kon Lovett, Jun '13 (module standard-conditions (;export ; arity-condition? type-condition? arithmetic-condition? i/o-condition? file-condition? network-condition? network-timeout-condition? bounds-condition? runtime-condition? runtime-limit-condition? runtime-cycle-condition? match-condition? syntax-condition? process-condition? access-condition? domain-condition? memory-condition?) (import scheme (standard-conditions memo)) ;;; Builtin Conditions ; Signaled when a procedure is called with the wrong number of arguments. (define arity-condition? (get 'arity-condition?)) ; Signaled on type-mismatch errors, for example when an argument of the wrong ; type is passed to a built-in procedure. (define type-condition? (get 'type-condition?)) ; Signaled on arithmetic errors, like division by zero. (define arithmetic-condition? (get 'arithmetic-condition?)) ; Signaled on input/output errors. (define i/o-condition? (get 'i/o-condition?)) ; Signaled on file-related errors. (define file-condition? (get 'file-condition?)) ; Signaled on network errors. (define network-condition? (get 'network-condition?)) ; Signaled on network timeout errors. (define network-timeout-condition? (get 'network-timeout-condition?)) ; Signaled on errors caused by accessing non-existent elements of a collection. (define bounds-condition? (get 'bounds-condition?)) ; Signaled on low-level runtime-system error-situations. (define runtime-condition? (get 'runtime-condition?)) ; Signaled when an internal limit is exceeded (like running out of memory). (define runtime-limit-condition? (get 'runtime-limit-condition?)) ; Signaled when a graph cycle detected. (define runtime-cycle-condition? (get 'runtime-cycle-condition?)) ; Signaled on errors raised by failed matches (see the section on match). (define match-condition? (get 'match-condition?)) ; Signaled on syntax errors. (define syntax-condition? (get 'syntax-condition?)) ; Signaled on process errors. (define process-condition? (get 'process-condition?)) ; Signaled on access errors. (define access-condition? (get 'access-condition?)) ; Signaled on domain errors. (define domain-condition? (get 'domain-condition?)) ; Signaled on memory errors. (define memory-condition? (get 'memory-condition?)) ) ;standard-conditions