From bd7328675a75d0a89574c1da4deb7e13a1fdf63a Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Tue, 17 Jul 2018 14:55:10 -0600 Subject: [PATCH] Construct error with message --- src/ol/AssertionError.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ol/AssertionError.js b/src/ol/AssertionError.js index b1ab3ac881..293c6996ae 100644 --- a/src/ol/AssertionError.js +++ b/src/ol/AssertionError.js @@ -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