Skip to content

Commit

Permalink
feat(ui): show error if map fails to process
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMakesGames committed Feb 27, 2024
1 parent 5a96dab commit 9c00a9c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/renderer/src/lib/map/MapContainer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,18 @@
This could take a few seconds...
</div>
</div>
{:catch reason}
<div class="absolute left-0 top-0 flex h-full w-full items-center bg-error-800">
<div class="h1 w-full text-center text-error-200">
Something has gone wrong
<br />
<code class="mt-3 inline-block max-w-96 text-sm">
{reason.toString().length > 200
? `${reason.toString().substring(0, 200)}...`
: reason.toString()}
</code>
</div>
</div>
{/await}
<svg
bind:this={svg}
Expand Down

0 comments on commit 9c00a9c

Please sign in to comment.