Skip to content

block exception clauses not "parallel" #1750

Description

@cgay

I think this is a bug in block:

block ()
  signal(make(<simple-error>))
exception (e :: <simple-error>)
  format-out("<simple-error> clause\n");
  // I think that the exception clause below should not be in effect when signal is called here.
  signal(e)
exception (e :: <error>)
  format-out("<error> clause\n");
end;
// output is:
// <simple-error> clause
// <error> clause

From the DRM:

  // https://opendylan.org/books/drm/Statement_Macros#IX-2062
  //
  // DRM: "Note that when the expressions in an exception body are executed, all handlers
  // established by the block are no longer active."
  //
  // DRM: "All exception clauses are executed in the same dynamic environment. None of
  // the handlers established in the block are visible during the execution of one of the
  // handlers. This can be thought of as parallel installation of the handlers."

So to be clear, I think the output just just be "<simple-error> clause" and it should get an unhandled exception.

Run it in the playground here: https://play.opendylan.org/shared/87c71506fc31e5c6

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DRMDRM compliance issues

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions