Construct error with message

This commit is contained in:
Tim Schaub
2018-07-17 14:55:10 -06:00
parent 7c6755d3ec
commit bd7328675a

View File

@@ -16,12 +16,10 @@ class AssertionError extends Error {
*/
constructor(code) {
const path = VERSION.split('-')[0];
const message = 'Assertion failed. See https://openlayers.org/en/' + path +
'/doc/errors/#' + code + ' for details.';
/**
* @type {string}
*/
this.message = 'Assertion failed. See https://openlayers.org/en/' + path +
'/doc/errors/#' + code + ' for details.';
super(message);
/**
* Error code. The meaning of the code can be found on