Next: Input & output in Pre-Scheme, Previous: Compound Pre-Scheme data manipulation, Up: Standard Pre-Scheme environment
Pre-Scheme's method of error handling is similar to the most common one
in C: error codes. There is an enumeration errors
of some error
codes commonly and portably encountered in Pre-Scheme.
(define-enumeration errors (no-errors parse-error file-not-found out-of-memory invalid-port))Each enumerand has the following meaning:
(enum errors no-errors)
- Absence of error: success.
(enum errors parse-error)
- Any kind of parsing error. The Scheme48 VM uses this when someone attempts to resume a malformed suspended heap image.
(enum errors file-not-found)
- Used when an operation that operates on a file given a string filename found that the file for that filename was absent.
(enum errors out-of-memory)
- When there is no more memory to allocate.
(enum errors invalid-port)
- Unused.