feat(04-02): global error handler + child-friendly error overlay
- Add error overlay HTML element in index.html before script tag - Add window error + unhandledrejection listeners in main.ts - Add error overlay CSS styles (fixed, z-index 9999, tree icon, reload button) - Error message: "Oh, der Wald braucht kurz eine Pause..."
This commit is contained in:
@@ -183,6 +183,14 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div id="error-overlay" class="error-overlay" style="display:none">
|
||||
<div class="error-overlay__content">
|
||||
<p class="error-overlay__icon">🌳</p>
|
||||
<p class="error-overlay__message">Oh, der Wald braucht kurz eine Pause...</p>
|
||||
<button class="error-overlay__btn" onclick="location.reload()">Nochmal versuchen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user