Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function BaseError(message) {
- _super.call(this, message);
- // Errors don't use current this, instead they create a new instance.
- // We have to do forward all of our api to the nativeInstance.
- // TODO(bradfordcsmith): Remove this hack when
- // google/closure-compiler/issues/2102 is fixed.
- var nativeError = new Error(message);
- this._nativeError = nativeError;
- }
- Object.defineProperty(BaseError.prototype, "message", {
- /**
- * @return {?}
- */
- get: function () { return this._nativeError.message; },
- /**
- * @param {?} message
- * @return {?}
- */
- set: function (message) { this._nativeError.message = message; },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(BaseError.prototype, "name", {
- /**
- * @return {?}
- */
- get: function () { return this._nativeError.name; },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(BaseError.prototype, "stack", {
- /**
- * @return {?}
- */
- get: function () { return ((this._nativeError)).stack; },
- /**
- * @param {?} value
- * @return {?}
- */
- set: function (value) { ((this._nativeError)).stack = value; },
- enumerable: true,
- configurable: true
- });
- /**
- * @return {?}
- */
- BaseError.prototype.toString = function () { return this._nativeError.toString(); };
- return BaseError;
- }(Error));
- function BaseError_tsickle_Closure_declarations() {
- /** @type {?} */
- BaseError.prototype._nativeError;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement