Distinguishing different types of exception #1

Open
opened 2025-07-07 08:58:08 +00:00 by simon · 0 comments
Owner

In order to selectively catch exceptions, we've got to be able to distinguish between them. Which means we need to pass an identifier — a number or a symbolic tag — as well as a message and a frame pointer.

Which means an exception cannot fit into a single cons space object.

Solutions

  1. Move exceptions to vector space. Disadvantage of doing this is it means churn of short lived vector space objects (but we already have this, with stack frames).
  2. Have two types of data space object representing an exception:
    1. EXEP, which points to a stack frame and an EXDT object;
    2. EXDT, which points to a string and holds a numeric exeption-type id.
In order to selectively catch exceptions, we've got to be able to distinguish between them. Which means we need to pass an identifier — a number or a symbolic tag — as well as a message and a frame pointer. Which means an exception cannot fit into a single cons space object. Solutions 1. Move exceptions to vector space. Disadvantage of doing this is it means churn of short lived vector space objects (but we already have this, with stack frames). 2. Have two types of data space object representing an exception: 1. `EXEP`, which points to a stack frame and an `EXDT` object; 2. `EXDT`, which points to a string and holds a numeric `exeption-type` id.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: simon/post-scarcity#1
No description provided.