From c9d60d357565b8fc57ea08b23b8db52775828c1c Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 6 Oct 2020 11:50:49 +0200 Subject: [PATCH] Online editor: clear errors --- tools/online_editor/index.html | 9 ++------- tools/online_editor/index.ts | 2 ++ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/tools/online_editor/index.html b/tools/online_editor/index.html index e3a026720..ea37d5ecc 100644 --- a/tools/online_editor/index.html +++ b/tools/online_editor/index.html @@ -7,15 +7,10 @@ +

This is a prototype for an online editor for the SixtyFPS language. More info github.com/sixtyfpsui/sixtyfps

- - - - - - -
\ No newline at end of file diff --git a/tools/online_editor/index.ts b/tools/online_editor/index.ts index 3cb2da73e..2454261aa 100644 --- a/tools/online_editor/index.ts +++ b/tools/online_editor/index.ts @@ -508,11 +508,13 @@ function render_or_error(source, div) { canvas.width = 800; canvas.height = 600; canvas.id = canvas_id; + div.innerHTML = ""; div.appendChild(canvas); try { sixtyfps.instantiate_from_string(source, canvas_id); } catch (e) { if (e.message === "Using exceptions for control flow, don't mind me. This isn't actually an error!") { + monaco.editor.setModelMarkers(editor.getModel(), "sixtyfps", []); throw e; } var text = document.createTextNode(e.message);