MCPcopy Create free account
hub / github.com/SAP/ui5-project / constructor

Method constructor

lib/validation/ValidationError.js:14–43  ·  view source on GitHub ↗
({errors, project, yaml})

Source from the content-addressed store, hash-verified

12 */
13class ValidationError extends Error {
14 constructor({errors, project, yaml}) {
15 super();
16
17 /**
18 * ValidationError
19 *
20 * @constant
21 * @default
22 * @type {string}
23 * @readonly
24 * @public
25 */
26 this.name = "ValidationError";
27
28 this.project = project;
29 this.yaml = yaml;
30
31 this.errors = ValidationError.filterErrors(errors);
32
33 /**
34 * Formatted error message
35 *
36 * @type {string}
37 * @readonly
38 * @public
39 */
40 this.message = this.formatErrors();
41
42 Error.captureStackTrace(this, this.constructor);
43 }
44
45 formatErrors() {
46 let separator = "\n\n";

Callers

nothing calls this directly

Calls 2

formatErrorsMethod · 0.95
filterErrorsMethod · 0.80

Tested by

no test coverage detected