mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-05 22:35:14 +08:00
chore(resource): use minErr to throw exception
This commit is contained in:
committed by
Ken Sheedlo
parent
52123ae85b
commit
aad29cbbf0
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user