From 28ce07d9812f5e1743afef95a94532d2c9488a84 Mon Sep 17 00:00:00 2001 From: dcodeIO Date: Mon, 2 Jan 2017 01:12:00 +0100 Subject: [PATCH] New: Be more verbose when throwing invalid wire type errors, see #602 --- src/reader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reader.js b/src/reader.js index 06b67dab3..9e501cdcc 100644 --- a/src/reader.js +++ b/src/reader.js @@ -487,7 +487,7 @@ ReaderPrototype.skipType = function(wireType) { /* istanbul ignore next */ default: - throw Error("invalid wire type: " + wireType); + throw Error("invalid wire type " + wireType + " at offset " + this.pos); } return this; };