Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit aad29cb

Browse files
petebacondarwinksheedlo
authored andcommitted
chore(resource): use minErr to throw exception
1 parent 52123ae commit aad29cb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/ngResource/resource.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict';
22

3+
var ngResourceMinErr = minErr('ngResource');
4+
35
/**
46
* @ngdoc overview
57
* @name ngResource
@@ -447,8 +449,8 @@ angular.module('ngResource', ['ng']).
447449
break;
448450
case 0: break;
449451
default:
450-
throw "Expected up to 4 arguments [params, data, success, error], got " +
451-
arguments.length + " arguments.";
452+
throw ngResourceMinErr('badargs',
453+
"Expected up to 4 arguments [params, data, success, error], got {0} arguments", arguments.length);
452454
}
453455

454456
var isInstanceCall = data instanceof Resource;

0 commit comments

Comments
 (0)