Skip to content

How to propagate TypeError? #124

@rigorpls

Description

@rigorpls

Following my attempts at #122, I'm trying to get the right output for the following snippet:

(condition-case thecond
    (length t)
  (error thecond))
;;=> (wrong-type-argument sequencep t)

Emacs has the wrong-type-argument symbol and an 'error-conditions property for it, which is used by ert.el.

However, rune gives me (error . "expected Sequence, found Symbol: t") here, and I don't see the TypeError originally created in length surviving the macros up until the condition_case implementation.

I've managed to get a similar output by replacing it with a LispError in 2d6d766, which is probably the wrong thing to do.

I've gathered the changes I needed to see basic should and should-error tests succeed in #123, in case it might be useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions