Skip to content

when Function with Incorrect Name Triggers Non-Descriptive Error Message #257

@yegor256

Description

@yegor256

This is what I'm doing:

$ cat simple.yml
name: foo
pattern: ⟦ !B ⟧
result: ⟦ !B ⟧
when:
  wrong-name:

$ cat foo.phi
{⟦ k ↦ "foo" ⟧}

$ phino rewrite --rule simple.yml --sweet --max-depth=2 < foo.phi
[ERROR]: Aeson exception:
Error in $.when: empty

I suggest we print something more meaningful, like The function "wrong-name" is not found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions