Skip to content

Better error handling #218

Closed
Closed
@benmccann

Description

@benmccann

Describe the problem

This calls compile:

const compiled = compile(finalCode, finalCompileOptions);

But that doesn't give enough details when there's a parse error

It looks like the same issue exists elsewhere - e.g. esbuild.ts

Describe the proposed solution

I think we need to wrap in a try / catch and report the err.frame

Alternatives considered

Maybe Svelte itself could give a better error message rather than making the client do it? I've fixed this same issue a whole bunch of places already. But then the client would have less control over display and we'd have to go and update all the clients that already handle the frame

Importance

would make my life easier

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageAwaiting triage by a project member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions