Skip to content

Improve exceptions reported by PolyglotEngine #116

@chumer

Description

@chumer

We should start classify errors that can occur in guest languages and instruments and report them in a checkable form. We can and should at least differentiate between ParseErrors, RuntimeErrors and InternalErrors. All of these errors that are reported to the outside should be equipped with structured information so they can relate to the given Source in PolyglotEngine#eval. They should have a base class which guest languages should be able to subclass. If guest languages cannot use these error classes for whatever reason they have to translate the errors in TruffleLanguage.

Discussion item: I think we should avoid checked exceptions (IOException) for generic errors in PolyglotEngine (I think checked exceptions only make sense if we need to ensure that they are always checked immediatly after using a method ie. UnexpectedResultException). Instead we should provide a runtime exception base class for Parse and Runtime errors.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions