@@ -2486,8 +2486,7 @@ Plotly.animate = function(gd, frameOrGroupNameOrFrameList, animationOpts) {
2486
2486
gd = getGraphDiv ( gd ) ;
2487
2487
2488
2488
if ( ! Lib . isPlotDiv ( gd ) ) {
2489
- Lib . warn ( 'This element is not a Plotly plot.' , gd ) ;
2490
- return Promise . reject ( ) ;
2489
+ throw new Error ( 'This element is not a Plotly plot: ' + gd ) ;
2491
2490
}
2492
2491
2493
2492
var trans = gd . _transitionData ;
@@ -2770,8 +2769,7 @@ Plotly.addFrames = function(gd, frameList, indices) {
2770
2769
gd = getGraphDiv ( gd ) ;
2771
2770
2772
2771
if ( ! Lib . isPlotDiv ( gd ) ) {
2773
- Lib . warn ( 'This element is not a Plotly plot.' , gd ) ;
2774
- return Promise . reject ( ) ;
2772
+ throw new Error ( 'This element is not a Plotly plot: ' + gd ) ;
2775
2773
}
2776
2774
2777
2775
var i , frame , j , idx ;
@@ -2780,8 +2778,7 @@ Plotly.addFrames = function(gd, frameList, indices) {
2780
2778
2781
2779
2782
2780
if ( ! Array . isArray ( frameList ) ) {
2783
- Lib . warn ( 'addFrames failure: frameList must be an Array of frame definitions' , frameList ) ;
2784
- return Promise . reject ( ) ;
2781
+ throw new Error ( 'addFrames failure: frameList must be an Array of frame definitions' + frameList ) ;
2785
2782
}
2786
2783
2787
2784
// Create a sorted list of insertions since we run into lots of problems if these
@@ -2859,8 +2856,7 @@ Plotly.deleteFrames = function(gd, frameList) {
2859
2856
gd = getGraphDiv ( gd ) ;
2860
2857
2861
2858
if ( ! Lib . isPlotDiv ( gd ) ) {
2862
- Lib . warn ( 'This element is not a Plotly plot.' , gd ) ;
2863
- return Promise . reject ( ) ;
2859
+ throw new Error ( 'This element is not a Plotly plot: ' + gd ) ;
2864
2860
}
2865
2861
2866
2862
var i , idx ;
0 commit comments