aboutsummaryrefslogtreecommitdiff
path: root/js/binary/reader.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/binary/reader.js')
-rw-r--r--js/binary/reader.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/binary/reader.js b/js/binary/reader.js
index cf80830f..731587c7 100644
--- a/js/binary/reader.js
+++ b/js/binary/reader.js
@@ -290,7 +290,9 @@ jspb.BinaryReader.prototype.nextField = function() {
nextWireType != jspb.BinaryConstants.WireType.DELIMITED &&
nextWireType != jspb.BinaryConstants.WireType.START_GROUP &&
nextWireType != jspb.BinaryConstants.WireType.END_GROUP) {
- goog.asserts.fail('Invalid wire type');
+ goog.asserts.fail(
+ 'Invalid wire type: %s (at position %s)', nextWireType,
+ this.fieldCursor_);
this.error_ = true;
return false;
}