Permalink
Browse files

Remove dependency on jQuery.error.

jQuery.error is just a simple wrapper around throw: http://github.com/jquery/jquery/blob/1533bf/src/core.js#L479-481
  • Loading branch information...
1 parent 04a1186 commit a1d3f7aded52848a58bd800f5ad182356665265a @tobie tobie committed with Dave Reed Jun 13, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 jquery.glob.js
View
@@ -590,7 +590,7 @@ function formatNumber(value, format, culture) {
number = expandNumber( number * (current === "P" ? 100 : 1), precision, formatInfo );
break;
default:
- $.error( "Bad number format specifier: " + current );
+ throw "Bad number format specifier: " + current;
}
var patternParts = /n|\$|-|%/g,
@@ -773,7 +773,7 @@ function expandFormat(cal, format) {
if ( len === 1 ) {
pattern = patterns[ format ];
if ( !pattern ) {
- $.error( "Invalid date format string '" + format + "'." );
+ throw "Invalid date format string '" + format + "'.";
}
format = pattern;
}
@@ -858,7 +858,7 @@ function getParseRegExp(cal, format) {
add = "(\\" + cal["/"] + ")";
break;
default:
- $.error( "Invalid date format pattern '" + m + "'." );
+ throw "Invalid date format pattern '" + m + "'.";
break;
}
if ( add ) {
@@ -1261,7 +1261,7 @@ function formatDate(value, format, culture) {
ret.push( cal["/"] );
break;
default:
- $.error( "Invalid date format pattern '" + current + "'." );
+ throw "Invalid date format pattern '" + current + "'.";
break;
}
}

0 comments on commit a1d3f7a

Please sign in to comment.