Commit 1781840a authored by Luciano Pacheco's avatar Luciano Pacheco Committed by Commit Bot

Files app: Add the name of the invalid property in the assert message

While working in the new file list I've faced this assert error and
couldn't figure out what metadata property name was wrong. This CL makes
easier to identify the invalid metadata property by adding the name in
the assert message.

Bug: 992821
Change-Id: I258867b9b33385667a9c45a5d59cc2cf4c76c246
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918796
Auto-Submit: Luciano Pacheco <lucmult@chromium.org>
Reviewed-by: default avatarAlex Danilo <adanilo@chromium.org>
Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715598}
parent 495cfdb2
......@@ -24,7 +24,7 @@ class MetadataProvider {
checkPropertyNames(names) {
// Check if the property name is correct or not.
for (let i = 0; i < names.length; i++) {
assert(this.validPropertyNames_[names[i]]);
assert(this.validPropertyNames_[names[i]], names[i]);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment