markabrahams / node-asn1-ber

Generate and parse ASN.1 BER objects
7 stars 8 forks source link

Correct names of error classes imported and used in `lib/ber/writer.js` which result in `not defined` error messages #7

Closed stephenwvickers closed 7 years ago

stephenwvickers commented 7 years ago

See: https://github.com/mcavage/node-asn1/pull/20/files

@@ -7,7 +7,7 @@ var errors = require('./errors');

  ///--- Globals

 -var newInvalidAsn1Error = errors.newInvalidAsn1Error;
 +var InvalidAsn1Error = errors.newInvalidAsn1Error;

  var DEFAULT_OPTS = {
    size: 1024,
 @@ -241,7 +241,7 @@ Writer.prototype.writeLength = function(len) {
      this._buf[this._offset++] = len >> 8;
      this._buf[this._offset++] = len;
    } else {
 -    throw new InvalidAsn1ERror('Length too long (> 4 bytes)');
 +    throw new InvalidAsn1Error('Length too long (> 4 bytes)');
    }
  };
stephenwvickers commented 7 years ago

Original requester: @mscdex