Skip to content

Commit

Permalink
Catch errors when createMap is called
Browse files Browse the repository at this point in the history
  • Loading branch information
tristen committed Oct 25, 2019
1 parent 6453c38 commit 2808224
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 1 deletion.
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
3 changes: 3 additions & 0 deletions bench/benchmarks/remove_paint_state.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ class RemovePaintState extends Benchmark {
style
}).then(map => {
this.map = map;
})
.catch(error => {
console.error(error);
});
});
}
Expand Down

0 comments on commit 2808224

Please sign in to comment.