@firebase/util 1.9.1 → 1.9.2-canary.36558bd2e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -306,7 +306,7 @@ var base64 = {
306
306
  var byte4 = haveByte4 ? charToByteMap[input.charAt(i)] : 64;
307
307
  ++i;
308
308
  if (byte1 == null || byte2 == null || byte3 == null || byte4 == null) {
309
- throw Error();
309
+ throw new DecodeBase64StringError();
310
310
  }
311
311
  var outByte1 = (byte1 << 2) | (byte2 >> 4);
312
312
  output.push(outByte1);
@@ -347,6 +347,18 @@ var base64 = {
347
347
  }
348
348
  }
349
349
  };
350
+ /**
351
+ * An error encountered while decoding base64 string.
352
+ */
353
+ var DecodeBase64StringError = /** @class */ (function (_super) {
354
+ tslib.__extends(DecodeBase64StringError, _super);
355
+ function DecodeBase64StringError() {
356
+ var _this = _super !== null && _super.apply(this, arguments) || this;
357
+ _this.name = 'DecodeBase64StringError';
358
+ return _this;
359
+ }
360
+ return DecodeBase64StringError;
361
+ }(Error));
350
362
  /**
351
363
  * URL-safe base64 encoding
352
364
  */
@@ -2118,6 +2130,7 @@ function getModularInstance(service) {
2118
2130
  CONSTANTS.NODE_CLIENT = true;
2119
2131
 
2120
2132
  exports.CONSTANTS = CONSTANTS;
2133
+ exports.DecodeBase64StringError = DecodeBase64StringError;
2121
2134
  exports.Deferred = Deferred;
2122
2135
  exports.ErrorFactory = ErrorFactory;
2123
2136
  exports.FirebaseError = FirebaseError;