Skip to content
This repository was archived by the owner on Jan 9, 2025. It is now read-only.
This repository was archived by the owner on Jan 9, 2025. It is now read-only.

spend fails without descriptive error #105

@Renegatto

Description

@Renegatto

Plutus.Model.Contract.spend fails with:

Exception: Maybe.fromJust: Nothing
CallStack (from HasCallStack):
  error, called at libraries/base/Data/Maybe.hs:149:21 in base:Data.Maybe
  fromJust, called at src/Plutus/Model/Contract.hs:276:10 in plutus-simple-model-0.5.2.0-4fEbkvuS1hh58koi6xqmzV:Plutus.Model.Contract

It forces user to dive into PSM source code to figure out the reason of the error, which is not the best user experience.

Proposed solution

Make a descriptive error message.
Maybe even take optional error message as a function parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions