diff options
| author | niv-openerp <nicolas.vanhoren@openerp.com> | 2012-01-24 16:22:39 +0100 |
|---|---|---|
| committer | niv-openerp <nicolas.vanhoren@openerp.com> | 2012-01-24 16:22:39 +0100 |
| commit | 31cdf276a2eb61195f94f50ce4618a8249dc3aad (patch) | |
| tree | 573a79b28d5ac6d257334707007015a44201fe5e /addons/web/static/lib/underscore/underscore.string.js | |
| parent | 2b1218b94c3f80f1ca99751f03fbd62b505e8111 (diff) | |
| parent | c044b704295345d7cbd6fb57cb54c8ad3addcd80 (diff) | |
[merge]
bzr revid: nicolas.vanhoren@openerp.com-20120124152239-yjtsn0j2yt4gif5e
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); } |
