Skip to content

Commit

Permalink
Catch errors when createMap is called (#8905)
Browse files Browse the repository at this point in the history
  • Loading branch information
tristen authored Oct 26, 2019
1 parent a9e2c30 commit 3885c7d
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 2 deletions.
2 changes: 2 additions & 0 deletions bench/benchmarks/layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export class LayerBenchmark extends Benchmark {
style: this.layerStyle
}).then(map => {
this.map = map;
}).catch(error => {
console.error(error);
});
}

Expand Down
6 changes: 5 additions & 1 deletion bench/benchmarks/map_load.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ export default class MapLoad extends Benchmark {
sources: {},
layers: []
}
}).then(map => map.remove());
})
.then(map => map.remove())
.catch(error => {
console.error(error);
});
}
}
3 changes: 3 additions & 0 deletions bench/benchmarks/paint.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export default class Paint extends Benchmark {
}))
.then(maps => {
this.maps = maps;
})
.catch(error => {
console.error(error);
});
}

Expand Down
2 changes: 2 additions & 0 deletions bench/benchmarks/paint_states.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export default class PaintStates extends Benchmark {
style
}).then(map => {
this.map = map;
}).catch(error => {
console.error(error);
});
});
}
Expand Down
3 changes: 3 additions & 0 deletions bench/benchmarks/query_box.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export default class QueryBox extends Benchmark {
}))
.then(maps => {
this.maps = maps;
})
.catch(error => {
console.error(error);
});
}

Expand Down
3 changes: 3 additions & 0 deletions bench/benchmarks/query_point.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ export default class QueryPoint extends Benchmark {
}))
.then(maps => {
this.maps = maps;
})
.catch(error => {
console.error(error);
});
}

Expand Down
5 changes: 4 additions & 1 deletion bench/benchmarks/remove_paint_state.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ class RemovePaintState extends Benchmark {
style
}).then(map => {
this.map = map;
});
})
.catch(error => {
console.error(error);
});
});
}

Expand Down

0 comments on commit 3885c7d

Please sign in to comment.