aboutsummaryrefslogtreecommitdiffstats
path: root/src/Angular.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/Angular.js')
-rw-r--r--src/Angular.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Angular.js b/src/Angular.js
index 5a5a4ab3..e0cf2df4 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -84,6 +84,7 @@ var _undefined = undefined,
PRIORITY_WATCH = -1000,
PRIORITY_LAST = 99999,
PRIORITY = {'FIRST': PRIORITY_FIRST, 'LAST': PRIORITY_LAST, 'WATCH':PRIORITY_WATCH},
+ Error = window.Error,
jQuery = window['jQuery'] || window['$'], // weirdness to make IE happy
_ = window['_'],
/** holds major version number for IE or NaN for real browsers */
@@ -557,6 +558,18 @@ function foreachSorted(obj, iterator, context) {
}
+function formatError(arg) {
+ if (arg instanceof Error) {
+ if (arg.stack) {
+ arg = arg.stack;
+ } else if (arg.sourceURL) {
+ arg = arg.message + '\n' + arg.sourceURL + ':' + arg.line;
+ }
+ }
+ return arg;
+}
+
+
function extend(dst) {
foreach(arguments, function(obj){
if (obj !== dst) {