summaryrefslogtreecommitdiff
path: root/dev/data-error.js
diff options
context:
space:
mode:
Diffstat (limited to 'dev/data-error.js')
-rw-r--r--dev/data-error.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/dev/data-error.js b/dev/data-error.js
index 5659245b..eb7f71bc 100644
--- a/dev/data-error.js
+++ b/dev/data-error.js
@@ -18,12 +18,14 @@
/**
* Schema validation error type.
*/
-class DataError extends Error {
+export class DataError extends Error {
/**
* @param {string} message
*/
constructor(message) {
super(message);
+ /** @type {string} */
+ this.name = 'DataError';
/** @type {unknown} */
this._data = void 0;
}
@@ -32,7 +34,3 @@ class DataError extends Error {
get data() { return this._data; }
set data(value) { this._data = value; }
}
-
-module.exports = {
- DataError
-};