diff options
| author | Vidhin Mehta (OpenERP) <vme@tinyerp.com> | 2012-01-24 14:50:26 +0530 |
|---|---|---|
| committer | Vidhin Mehta (OpenERP) <vme@tinyerp.com> | 2012-01-24 14:50:26 +0530 |
| commit | 2063f02b5ea8417875078f79ee4a08b3b525ab37 (patch) | |
| tree | 708854ad10dbf30243a349d1c18816316310ad2d /addons/web/static/lib/underscore/underscore.string.js | |
| parent | 2ffb3404fc818f3253cd09e930222344a9699aab (diff) | |
| parent | a0bc35050e1769769df0f2a03dbb33d31b1dc47d (diff) | |
[Merge]merge with main branch.
bzr revid: vme@tinyerp.com-20120124092026-blodtisdbl1ysssd
Diffstat (limited to 'addons/web/static/lib/underscore/underscore.string.js')
| -rw-r--r-- | addons/web/static/lib/underscore/underscore.string.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/addons/web/static/lib/underscore/underscore.string.js b/addons/web/static/lib/underscore/underscore.string.js index 99966c3f475..d0b6ff1ffb3 100644 --- a/addons/web/static/lib/underscore/underscore.string.js +++ b/addons/web/static/lib/underscore/underscore.string.js @@ -73,7 +73,7 @@ arg = argv[cursor]; for (k = 0; k < match[2].length; k++) { if (!arg.hasOwnProperty(match[2][k])) { - throw(sprintf('[_.sprintf] property "%s" does not exist', match[2][k])); + throw new Error(sprintf('[_.sprintf] property "%s" does not exist', match[2][k])); } arg = arg[match[2][k]]; } @@ -85,7 +85,7 @@ } if (/[^s]/.test(match[8]) && (get_type(arg) != 'number')) { - throw(sprintf('[_.sprintf] expecting number but found %s', get_type(arg))); + throw new Error(sprintf('[_.sprintf] expecting number but found %s', get_type(arg))); } switch (match[8]) { case 'b': arg = arg.toString(2); break; @@ -134,12 +134,12 @@ field_list.push(field_match[1]); } else { - throw('[_.sprintf] huh?'); + throw new Error('[_.sprintf] huh?'); } } } else { - throw('[_.sprintf] huh?'); + throw new Error('[_.sprintf] huh?'); } match[2] = field_list; } @@ -147,12 +147,12 @@ arg_names |= 2; } if (arg_names === 3) { - throw('[_.sprintf] mixing positional and named placeholders is not (yet) supported'); + throw new Error('[_.sprintf] mixing positional and named placeholders is not (yet) supported'); } parse_tree.push(match); } else { - throw('[_.sprintf] huh?'); + throw new Error('[_.sprintf] huh?'); } _fmt = _fmt.substring(match[0].length); } |
