Skip to content

Commit

Permalink
chore: Backport #3864 to web (#3867)
Browse files Browse the repository at this point in the history
Co-authored-by: Jonathan <vanillajonathan@users.noreply.github.com>
  • Loading branch information
prql-bot and vanillajonathan authored Nov 29, 2023
1 parent e25acce commit 04e97b4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions web/playground/src/workbench/Workbench.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ class Workbench extends React.Component {
this.setState({ prqlError: null });
this.monaco.editor.setModelMarkers(this.editor.getModel(), "prql", []);
} catch (e) {
if (e instanceof WebAssembly.RuntimeError) {
this.setState({
prqlError:
"A compiler bug encountered. Please report this to https://github.com/PRQL/prql/issues/new/choose",
});
return;
}

const errors = JSON.parse(e.message).inner;
this.setState({ prqlError: errors[0].display });

Expand Down

0 comments on commit 04e97b4

Please sign in to comment.