dist/vendor.bundle.js
function instantiationError(injector, originalException, originalStack, key) {
    return injectionError(injector, key, function () {
        var /** @type {?} */ first = stringify(this.keys[0].token);
        return getOriginalError(this).message + ": Error during instantiation of " + first + "!" + constructResolvingPath(this.keys) + ".";
    }, originalException);
}
function instantiationError(injector, originalException, originalStack, key) {
    return injectionError(injector, key, function () {
        var /** @type {?} */ first = stringify(this.keys[0].token);
        return getOriginalError(this).message + ": Error during instantiation of " + first + "!" + constructResolvingPath(this.keys) + ".";
    }, originalException);
}
function instantiationError ( injector , originalException , originalStack , key ) { return injectionError ( injector , key , function ( ) { var /** @type {?} */ first = stringify ( this . keys [ 0 ] . token ) ; return getOriginalError ( this ) . message + ": Error during instantiation of " + first + "!" + constructResolvingPath ( this . keys ) + "." ; } , originalException ) ; }
Thrown when a constructing type returns with an Error.

The `InstantiationError` class contains the original error plus the dependency graph which caused
this object to be instantiated.

### Example ([live demo](http://plnkr.co/edit/7aWYdcqTQsP0eNqEdUAf?p=preview))

```typescript
class A {
constructor() {
throw new Error('message');
}
}

var injector = Injector.resolveAndCreate([A]);
try {
injector.get(A);
} catch (e) {
expect(e instanceof InstantiationError).toBe(true);
expect(e.originalException.message).toEqual("message");
expect(e.originalStack).toBeDefined();
}
```
@param {?} injector
@param {?} originalException
@param {?} originalStack
@param {?} key
@return {?}
Thrown when a constructing type returns with an Error .