

const require_CredoError = require('./CredoError.js');

//#region src/error/ClassValidationError.ts
var ClassValidationError = class extends require_CredoError.CredoError {
	validationErrorsToString() {
		return this.validationErrors?.map((error) => error.toString(true)).join("\n") ?? "";
	}
	constructor(message, { classType, cause, validationErrors }) {
		const validationErrorsStringified = validationErrors?.map((error) => error.toString(void 0, void 0, void 0, true)).join("\n");
		super(`${classType}: ${message}
${validationErrorsStringified}`, { cause });
		this.validationErrors = validationErrors ?? [];
	}
};

//#endregion
exports.ClassValidationError = ClassValidationError;