PHP 8.2.30
Preview: error_classes.js Size: 828 B
//lib/node_modules/npm/node_modules/har-validator/node_modules/ajv/lib/compile/error_classes.js

'use strict';

var resolve = require('./resolve');

module.exports = {
  Validation: errorSubclass(ValidationError),
  MissingRef: errorSubclass(MissingRefError)
};


function ValidationError(errors) {
  this.message = 'validation failed';
  this.errors = errors;
  this.ajv = this.validation = true;
}


MissingRefError.message = function (baseId, ref) {
  return 'can\'t resolve reference ' + ref + ' from id ' + baseId;
};


function MissingRefError(baseId, ref, message) {
  this.message = message || MissingRefError.message(baseId, ref);
  this.missingRef = resolve.url(baseId, ref);
  this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef));
}


function errorSubclass(Subclass) {
  Subclass.prototype = Object.create(Error.prototype);
  Subclass.prototype.constructor = Subclass;
  return Subclass;
}

Directory Contents

Dirs: 0 × Files: 10

Name Size Perms Modified Actions
2.58 KB lrw-r--r-- 2021-03-10 14:36:40
Edit Download
176 B lrw-r--r-- 2021-03-10 14:36:40
Edit Download
828 B lrw-r--r-- 2021-03-10 14:36:40
Edit Download
11.80 KB lrw-r--r-- 2021-03-10 14:36:40
Edit Download
10.44 KB lrw-r--r-- 2021-03-10 14:36:40
Edit Download
7.66 KB lrw-r--r-- 2021-03-10 14:36:40
Edit Download
1.97 KB lrw-r--r-- 2021-03-10 14:36:40
Edit Download
133 B lrw-r--r-- 2021-03-10 14:36:40
Edit Download
558 B lrw-r--r-- 2021-03-10 14:36:40
Edit Download
6.81 KB lrw-r--r-- 2021-03-10 14:36:40
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).