Skip to content

Suggestion: Instead of throwing exception on errors returned from Typst library, return an error object #24

Description

@jshergal

I know that discriminated unions still don't exist in .NET, but since we are already returning a CompileOutcome object, it would be easy to extend that object to include the error information and then consumers of the library don't have to add additional exception handling to deal with control flow issues. Plus, with the update to return the error information (including line number and column info) from the Typst library, we could now create a more meaningful error list (we could even parse it to provide a TypstError object that has line and column info.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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