Skip to content

Commit 8fdd42a

Browse files
committed
Fix - catch excpetion when parsing TF1
TF1 title may not content valid expression therefore new Function may fail. Catch exception and try to use saved points
1 parent 2f04ffe commit 8fdd42a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

modules/hist/TF1Painter.mjs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,14 @@ class TF1Painter extends TH1Painter {
183183
const np = Math.max(tf1.fNpx, 100);
184184
let iserror = false;
185185

186-
if (!tf1.evalPar && !proivdeEvalPar(tf1))
187-
iserror = true;
186+
if (!tf1.evalPar) {
187+
try {
188+
if (!proivdeEvalPar(tf1))
189+
iserror = true;
190+
} catch {
191+
iserror = true;
192+
}
193+
}
188194

189195
ensureBins(np);
190196

0 commit comments

Comments
 (0)