From aad29cbbf0b101bc5e793a66df7e368c7968cad8 Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Mon, 8 Jul 2013 11:42:31 +0100 Subject: chore(resource): use minErr to throw exception --- src/ngResource/resource.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/ngResource') diff --git a/src/ngResource/resource.js b/src/ngResource/resource.js index 2df593c1..134c1a03 100644 --- a/src/ngResource/resource.js +++ b/src/ngResource/resource.js @@ -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; -- cgit v1.2.3