1
1
/**
2
- * @license AngularJS v1.2.7
2
+ * @license AngularJS v1.2.8
3
3
* (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
* License: MIT
5
5
*/
@@ -2086,6 +2086,20 @@ if(window.jasmine || window.mocha) {
2086
2086
*
2087
2087
* @param {...Function } fns any number of functions which will be injected using the injector.
2088
2088
*/
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
+
2089
2103
window . inject = angular . mock . inject = function ( ) {
2090
2104
var blockFns = Array . prototype . slice . call ( arguments , 0 ) ;
2091
2105
var errorForStack = new Error ( 'Declaration Location' ) ;
@@ -2106,7 +2120,9 @@ if(window.jasmine || window.mocha) {
2106
2120
injector . invoke ( blockFns [ i ] || angular . noop , this ) ;
2107
2121
/* jshint +W040 */
2108
2122
} catch ( e ) {
2109
- if ( e . stack && errorForStack ) e . stack += '\n' + errorForStack . stack ;
2123
+ if ( e . stack && errorForStack ) {
2124
+ throw new ErrorAddingDeclarationLocationStack ( e , errorForStack ) ;
2125
+ }
2110
2126
throw e ;
2111
2127
} finally {
2112
2128
errorForStack = null ;
0 commit comments