@@ -2487,8 +2487,7 @@ Plotly.animate = function(gd, frameOrGroupNameOrFrameList, animationOpts) {
24872487 gd = getGraphDiv ( gd ) ;
24882488
24892489 if ( ! Lib . isPlotDiv ( gd ) ) {
2490- Lib . warn ( 'This element is not a Plotly plot.' , gd ) ;
2491- return Promise . reject ( ) ;
2490+ throw new Error ( 'This element is not a Plotly plot: ' + gd ) ;
24922491 }
24932492
24942493 var trans = gd . _transitionData ;
@@ -2771,8 +2770,7 @@ Plotly.addFrames = function(gd, frameList, indices) {
27712770 gd = getGraphDiv ( gd ) ;
27722771
27732772 if ( ! Lib . isPlotDiv ( gd ) ) {
2774- Lib . warn ( 'This element is not a Plotly plot.' , gd ) ;
2775- return Promise . reject ( ) ;
2773+ throw new Error ( 'This element is not a Plotly plot: ' + gd ) ;
27762774 }
27772775
27782776 var i , frame , j , idx ;
@@ -2781,8 +2779,7 @@ Plotly.addFrames = function(gd, frameList, indices) {
27812779
27822780
27832781 if ( ! Array . isArray ( frameList ) ) {
2784- Lib . warn ( 'addFrames failure: frameList must be an Array of frame definitions' , frameList ) ;
2785- return Promise . reject ( ) ;
2782+ throw new Error ( 'addFrames failure: frameList must be an Array of frame definitions' + frameList ) ;
27862783 }
27872784
27882785 // Create a sorted list of insertions since we run into lots of problems if these
@@ -2860,8 +2857,7 @@ Plotly.deleteFrames = function(gd, frameList) {
28602857 gd = getGraphDiv ( gd ) ;
28612858
28622859 if ( ! Lib . isPlotDiv ( gd ) ) {
2863- Lib . warn ( 'This element is not a Plotly plot.' , gd ) ;
2864- return Promise . reject ( ) ;
2860+ throw new Error ( 'This element is not a Plotly plot: ' + gd ) ;
28652861 }
28662862
28672863 var i , idx ;
0 commit comments