Skip to content

Ability to convert exceptions into strings #4178

Open
@lastmjs

Description

@lastmjs

I've been working in a strict wasm32-unknown-unknown environment, and I've been having a hard time with exceptions from the vm, as when you print them the string is not very useful at all. I just found vm.print_exception and it has actually useful information in it. This method works great if println works in you environment, but in the wasm32-unknown-unknown environment I'm in I can't use the println macro directly. It would be great if the RustPython errors had a method called something like to_readable_string or something that will do the same thing as vm.print_exception, but instead return the error so that it can be dealt with in other ways.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions