File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -1332,8 +1332,12 @@ class TH1Painter extends THistPainter {
1332
1332
if ( ! this . options . Mode3D )
1333
1333
return this . draw2D ( reason ) ;
1334
1334
1335
- return this . draw3D ( reason ) . catch ( ( ) => {
1336
- console . error ( 'Fail to draw histogram in 3D - back to 2D' )
1335
+ return this . draw3D ( reason ) . catch ( err => {
1336
+ const cp = this . getCanvPainter ( ) ;
1337
+ if ( isFunc ( cp ?. showConsoleError ) )
1338
+ cp . showConsoleError ( err ) ;
1339
+ else
1340
+ console . error ( 'Fail to draw histogram in 3D - back to 2D' ) ;
1337
1341
this . options . Mode3D = false ;
1338
1342
return this . draw2D ( reason ) ;
1339
1343
} ) ;
Original file line number Diff line number Diff line change @@ -3548,8 +3548,12 @@ class TH2Painter extends THistPainter {
3548
3548
if ( ! this . options . Mode3D )
3549
3549
return this . draw2D ( reason ) ;
3550
3550
3551
- return this . draw3D ( reason ) . catch ( ( ) => {
3552
- console . error ( 'Fail to draw histogram in 3D - back to 2D' )
3551
+ return this . draw3D ( reason ) . catch ( err => {
3552
+ const cp = this . getCanvPainter ( ) ;
3553
+ if ( isFunc ( cp ?. showConsoleError ) )
3554
+ cp . showConsoleError ( err ) ;
3555
+ else
3556
+ console . error ( 'Fail to draw histogram in 3D - back to 2D' ) ;
3553
3557
this . options . Mode3D = false ;
3554
3558
return this . draw2D ( reason ) ;
3555
3559
} ) ;
You can’t perform that action at this time.
0 commit comments