Construct error with message
This commit is contained in:
@@ -16,12 +16,10 @@ class AssertionError extends Error {
|
|||||||
*/
|
*/
|
||||||
constructor(code) {
|
constructor(code) {
|
||||||
const path = VERSION.split('-')[0];
|
const path = VERSION.split('-')[0];
|
||||||
|
const message = 'Assertion failed. See https://openlayers.org/en/' + path +
|
||||||
|
'/doc/errors/#' + code + ' for details.';
|
||||||
|
|
||||||
/**
|
super(message);
|
||||||
* @type {string}
|
|
||||||
*/
|
|
||||||
this.message = 'Assertion failed. See https://openlayers.org/en/' + path +
|
|
||||||
'/doc/errors/#' + code + ' for details.';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Error code. The meaning of the code can be found on
|
* Error code. The meaning of the code can be found on
|
||||||
|
|||||||
Reference in New Issue
Block a user