From 142abd3134f3ed4cf5878986cedfcb3b58c169fe Mon Sep 17 00:00:00 2001 From: Dan Moran MBA15 Date: Tue, 26 Nov 2024 11:38:27 +0100 Subject: [PATCH] new error messages --- src/components/Colorbar.astro | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/Colorbar.astro b/src/components/Colorbar.astro index c98ac77..8f92d6a 100644 --- a/src/components/Colorbar.astro +++ b/src/components/Colorbar.astro @@ -23,9 +23,16 @@ function updateColorbar() { for (const value of stops){ const div = document.createElement('div'); // Creat a label that shows three significant digits + try { const label = value.toPrecision(3); div.innerHTML = label; colorbar.appendChild(div); + } catch (e) { + console.log(`Error in updateColorbar. E=`,e); + console.log(`Error in updateColorbar. value`,value); + console.log(`Error in updateColorbar. stops`,stops); + } + } colorbar.style.background = getPaletteAsGradient(); return;