aboutsummaryrefslogtreecommitdiff
path: root/src/checkable.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-10-15 18:30:02 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-10-15 18:30:02 +0200
commit03782f8aea043042aaa069de0b91cdb80fbb4679 (patch)
treecc8890eb060fe15cefa107c9261fc7e558d564b1 /src/checkable.ts
parent23633cf1be5ce8f1bc4d7823d1d561149cb6c8a8 (diff)
derive history from db instead of storing it
Diffstat (limited to 'src/checkable.ts')
-rw-r--r--src/checkable.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/checkable.ts b/src/checkable.ts
index e6ef99336..0e437839e 100644
--- a/src/checkable.ts
+++ b/src/checkable.ts
@@ -183,7 +183,7 @@ export namespace Checkable {
if (innerProp.optional) {
continue;
}
- throw new SchemaError(`Property ${innerProp.propertyKey} missing on ${path}`);
+ throw new SchemaError(`Property ${innerProp.propertyKey} missing on ${path} of ${type.name||"??"}`);
}
if (!remainingPropNames.delete(innerProp.propertyKey)) {
throw new SchemaError("assertion failed");
@@ -195,8 +195,7 @@ export namespace Checkable {
}
if (!prop.extraAllowed && remainingPropNames.size !== 0) {
- throw new SchemaError("superfluous properties " + JSON.stringify(Array.from(
- remainingPropNames.values())));
+ throw new SchemaError(`superfluous properties ${JSON.stringify(Array.from(remainingPropNames.values()))} of ${type.name||"??"}`);
}
return obj;
}