mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
chore(resource): use minErr to throw exception
This commit is contained in:
parent
52123ae85b
commit
aad29cbbf0
1 changed files with 4 additions and 2 deletions
|
|
@ -1,5 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
var ngResourceMinErr = minErr('ngResource');
|
||||
|
||||
/**
|
||||
* @ngdoc overview
|
||||
* @name ngResource
|
||||
|
|
@ -447,8 +449,8 @@ angular.module('ngResource', ['ng']).
|
|||
break;
|
||||
case 0: break;
|
||||
default:
|
||||
throw "Expected up to 4 arguments [params, data, success, error], got " +
|
||||
arguments.length + " arguments.";
|
||||
throw ngResourceMinErr('badargs',
|
||||
"Expected up to 4 arguments [params, data, success, error], got {0} arguments", arguments.length);
|
||||
}
|
||||
|
||||
var isInstanceCall = data instanceof Resource;
|
||||
|
|
|
|||
Loading…
Reference in a new issue