examples/webpack/dist/app.e100c23eefa4ef71b346.js
function ZoneAwareError() {
        // make sure we have a valid this
        // if this is undefined(call Error without new) or this is global
        // or this is some other objects, we should force to create a
        // valid ZoneAwareError by call Object.create()
        if (!(this instanceof ZoneAwareError)) {
            return ZoneAwareError.apply(Object.create(ZoneAwareError.prototype), arguments);
        }
        // Create an Error.
        var error = NativeError.apply(this, arguments);
        this[__symbol__('error')] = error;
        // Save original stack trace
        error.originalStack = error.stack;
        // Process the stack trace and rewrite the frames.
        if (ZoneAwareError[stackRewrite] && error.originalStack) {
            var frames_1 = error.originalStack.split('\n');
            var zoneFrame = _currentZoneFrame;
            var i = 0;
            // Find the first frame
            while (frames_1[i] !== zoneAwareFrame && i < frames_1.length) {
                i++;
            }
            for (; i < frames_1.length && zoneFrame; i++) {
                var frame = frames_1[i];
                if (frame.trim()) {
                    var frameType = blackListedStackFrames.hasOwnProperty(frame) && blackListedStackFrames[frame];
                    if (frameType === FrameType.blackList) {
                        frames_1.splice(i, 1);
                        i--;
                    }
                    else if (frameType === FrameType.transition) {
                        if (zoneFrame.parent) {
                            // This is the special frame where zone changed. Print and process it accordingly
                            frames_1[i] += " [" + zoneFrame.parent.zone.name + " => " + zoneFrame.zone.name + "]";
                            zoneFrame = zoneFrame.parent;
                        }
                        else {
                            zoneFrame = null;
                        }
                    }
                    else {
                        frames_1[i] += " [" + zoneFrame.zone.name + "]";
                    }
                }
            }
            error.stack = error.zoneAwareStack = frames_1.join('\n');
        }
        // use defineProperties here instead of copy property value
        // because of issue #595 which will break angular2.
        Object.defineProperties(this, getErrorPropertiesForPrototype(Object.getPrototypeOf(this)));
        return this;
    }
function ZoneAwareError() {
        // make sure we have a valid this
        // if this is undefined(call Error without new) or this is global
        // or this is some other objects, we should force to create a
        // valid ZoneAwareError by call Object.create()
        if (!(this instanceof ZoneAwareError)) {
            return ZoneAwareError.apply(Object.create(ZoneAwareError.prototype), arguments);
        }
        // Create an Error.
        var error = NativeError.apply(this, arguments);
        this[__symbol__('error')] = error;
        // Save original stack trace
        error.originalStack = error.stack;
        // Process the stack trace and rewrite the frames.
        if (ZoneAwareError[stackRewrite] && error.originalStack) {
            var frames_1 = error.originalStack.split('\n');
            var zoneFrame = _currentZoneFrame;
            var i = 0;
            // Find the first frame
            while (frames_1[i] !== zoneAwareFrame && i < frames_1.length) {
                i++;
            }
            for (; i < frames_1.length && zoneFrame; i++) {
                var frame = frames_1[i];
                if (frame.trim()) {
                    var frameType = blackListedStackFrames.hasOwnProperty(frame) && blackListedStackFrames[frame];
                    if (frameType === FrameType.blackList) {
                        frames_1.splice(i, 1);
                        i--;
                    }
                    else if (frameType === FrameType.transition) {
                        if (zoneFrame.parent) {
                            // This is the special frame where zone changed. Print and process it accordingly
                            frames_1[i] += " [" + zoneFrame.parent.zone.name + " => " + zoneFrame.zone.name + "]";
                            zoneFrame = zoneFrame.parent;
                        }
                        else {
                            zoneFrame = null;
                        }
                    }
                    else {
                        frames_1[i] += " [" + zoneFrame.zone.name + "]";
                    }
                }
            }
            error.stack = error.zoneAwareStack = frames_1.join('\n');
        }
        // use defineProperties here instead of copy property value
        // because of issue #595 which will break angular2.
        Object.defineProperties(this, getErrorPropertiesForPrototype(Object.getPrototypeOf(this)));
        return this;
    }
function ZoneAwareError ( ) { // make sure we have a valid this // if this is undefined(call Error without new) or this is global // or this is some other objects, we should force to create a // valid ZoneAwareError by call Object.create() if ( ! ( this instanceof ZoneAwareError ) ) { return ZoneAwareError . apply ( Object . create ( ZoneAwareError . prototype ) , arguments ) ; } // Create an Error. var error = NativeError . apply ( this , arguments ) ; this [ __symbol__ ( 'error' ) ] = error ; // Save original stack trace error . originalStack = error . stack ; // Process the stack trace and rewrite the frames. if ( ZoneAwareError [ stackRewrite ] && error . originalStack ) { var frames_1 = error . originalStack . split ( '\n' ) ; var zoneFrame = _currentZoneFrame ; var i = 0 ; // Find the first frame while ( frames_1 [ i ] !== zoneAwareFrame && i < frames_1 . length ) { i ++ ; } for ( ; i < frames_1 . length && zoneFrame ; i ++ ) { var frame = frames_1 [ i ] ; if ( frame . trim ( ) ) { var frameType = blackListedStackFrames . hasOwnProperty ( frame ) && blackListedStackFrames [ frame ] ; if ( frameType === FrameType . blackList ) { frames_1 . splice ( i , 1 ) ; i -- ; } else if ( frameType === FrameType . transition ) { if ( zoneFrame . parent ) { // This is the special frame where zone changed. Print and process it accordingly frames_1 [ i ] += " [" + zoneFrame . parent . zone . name + " => " + zoneFrame . zone . name + "]" ; zoneFrame = zoneFrame . parent ; } else { zoneFrame = null ; } } else { frames_1 [ i ] += " [" + zoneFrame . zone . name + "]" ; } } } error . stack = error . zoneAwareStack = frames_1 . join ( '\n' ) ; } // use defineProperties here instead of copy property value // because of issue #595 which will break angular2. Object . defineProperties ( this , getErrorPropertiesForPrototype ( Object . getPrototypeOf ( this ) ) ) ; return this ; }
This is ZoneAwareError which processes the stack frame and cleans up extra frames as well as
adds zone information to it.
This is ZoneAwareError which processes the stack frame and cleans up extra frames as well as adds zone information to it .