aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/rootScope.js
diff options
context:
space:
mode:
authorIgor Minar2013-05-24 11:00:14 -0700
committerVojta Jina2013-05-24 17:03:21 -0700
commitb8ea7f6aba2e675b85826b0bee1f21ddd7b866a5 (patch)
treef3b34e25e27d088bec9b698b246d49f86281de36 /src/ng/rootScope.js
parent88eaea8e7bf025a7805a5d20f5d47472e4f26f6f (diff)
downloadangular.js-b8ea7f6aba2e675b85826b0bee1f21ddd7b866a5.tar.bz2
feat(ngError): add error message compression and better error messages
- add toThrowNg matcher
Diffstat (limited to 'src/ng/rootScope.js')
-rw-r--r--src/ng/rootScope.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/ng/rootScope.js b/src/ng/rootScope.js
index 904f24d4..66486551 100644
--- a/src/ng/rootScope.js
+++ b/src/ng/rootScope.js
@@ -161,10 +161,6 @@ function $RootScopeProvider(){
var Child,
child;
- if (isFunction(isolate)) {
- // TODO: remove at some point
- throw Error('API-CHANGE: Use $controller to instantiate controllers.');
- }
if (isolate) {
child = new Scope();
child.$root = this.$root;
@@ -560,8 +556,9 @@ function $RootScopeProvider(){
if(dirty && !(ttl--)) {
clearPhase();
- throw Error(TTL + ' $digest() iterations reached. Aborting!\n' +
- 'Watchers fired in the last 5 iterations: ' + toJson(watchLog));
+ throw ngError(27,
+ '{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}',
+ TTL, toJson(watchLog));
}
} while (dirty || asyncQueue.length);
@@ -923,7 +920,7 @@ function $RootScopeProvider(){
function beginPhase(phase) {
if ($rootScope.$$phase) {
- throw Error($rootScope.$$phase + ' already in progress');
+ throw ngError(28, '{0} already in progress', $rootScope.$$phase);
}
$rootScope.$$phase = phase;