@samitouri / QOS-React-2 / commits / 6363fc0767

Tweaked error message to provide more helpful info if shown

Brian Vaughn committed Jan 30, 2019 at 14:39 UTC 6363fc0767d17db1764557e83ad3227d2aea65c9
1 file changed +1 -1
src/devtools/store.js
+1 -1
@@ -57,7 +57,7 @@ export default class Store extends EventEmitter {
57
58 getElementAtIndex(index: number): Element {
59 if (index < 0 || index >= this.numElements) {
60 - throw Error(`Invalid index ${index} specified`);
60 + throw Error(`Invalid index ${index} specified; store contains ${this.numElements} items.`);
61 }
62
63 // Find wich root this element is in...