Closed Bug 713519 Opened 13 years ago Closed 12 years ago

getCharsetAlias should throw for unknown character sets

Categories

(Core :: Internationalization, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: asaf, Assigned: asaf)

References

Details

Attachments

(1 file)

throw Components.classes["@mozilla.org/charset-converter-manager;1"].getService(Components.interfaces.nsICharsetConverterManager).getCharsetAlias("no such thing");

Error: uncaught exception: no such thing
Attached patch patchSplinter Review
Attachment #584321 - Flags: review?(smontagu)
Assignee: smontagu → mano
Status: NEW → ASSIGNED
Comment on attachment 584321 [details] [diff] [review]
patch

Cancelling review request as I'm not sure that the properties files covers everything.
Attachment #584321 - Flags: review?(smontagu)
Comment on attachment 584321 [details] [diff] [review]
patch

Oh well, it actually does. Sorry for the spam
Attachment #584321 - Flags: review?(smontagu)
Comment on attachment 584321 [details] [diff] [review]
patch

Review of attachment 584321 [details] [diff] [review]:
-----------------------------------------------------------------

::: intl/uconv/tests/unit/test_bug713519.js
@@ +15,5 @@
> +
> +  do_check_eq(svc.getCharsetTitle("windows-1255"), "Hebrew (Windows-1255)");
> +  try {
> +    svc.getCharsetTitle("no such thing");
> +    do_throw("Calling getCharsetAlias with invalid value should throw.");

Change the second error message to "getCharsetTitle".
Attachment #584321 - Flags: review?(smontagu) → review+
https://hg.mozilla.org/mozilla-central/rev/d76bf407d5c1
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
Depends on: 718500
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: