11/**
2- * @license AngularJS v1.2.7
2+ * @license AngularJS v1.2.8
33 * (c) 2010-2014 Google, Inc. http://angularjs.org
44 * License: MIT
55 */
@@ -2086,6 +2086,20 @@ if(window.jasmine || window.mocha) {
20862086 *
20872087 * @param {...Function } fns any number of functions which will be injected using the injector.
20882088 */
2089+
2090+
2091+
2092+ var ErrorAddingDeclarationLocationStack = function ( e , errorForStack ) {
2093+ this . message = e . message ;
2094+ this . name = e . name ;
2095+ if ( e . line ) this . line = e . line ;
2096+ if ( e . sourceId ) this . sourceId = e . sourceId ;
2097+ if ( e . stack && errorForStack )
2098+ this . stack = e . stack + '\n' + errorForStack . stack ;
2099+ if ( e . stackArray ) this . stackArray = e . stackArray ;
2100+ } ;
2101+ ErrorAddingDeclarationLocationStack . prototype . toString = Error . prototype . toString ;
2102+
20892103 window . inject = angular . mock . inject = function ( ) {
20902104 var blockFns = Array . prototype . slice . call ( arguments , 0 ) ;
20912105 var errorForStack = new Error ( 'Declaration Location' ) ;
@@ -2106,7 +2120,9 @@ if(window.jasmine || window.mocha) {
21062120 injector . invoke ( blockFns [ i ] || angular . noop , this ) ;
21072121 /* jshint +W040 */
21082122 } catch ( e ) {
2109- if ( e . stack && errorForStack ) e . stack += '\n' + errorForStack . stack ;
2123+ if ( e . stack && errorForStack ) {
2124+ throw new ErrorAddingDeclarationLocationStack ( e , errorForStack ) ;
2125+ }
21102126 throw e ;
21112127 } finally {
21122128 errorForStack = null ;
0 commit comments