<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>27248</bug_id>
          
          <creation_ts>2014-11-05 12:21:09 +0000</creation_ts>
          <short_desc>Consider changing the exceptions</short_desc>
          <delta_ts>2014-11-17 14:42:00 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>Encoding</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Domenic Denicola">d</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>mike</cc>
    
    <cc>www-international</cc>
          
          <qa_contact>sideshowbarker+encodingspec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>114552</commentid>
    <comment_count>0</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2014-11-05 12:21:09 +0000</bug_when>
    <thetext>https://encoding.spec.whatwg.org/#interface-textencoder

[[
throws a TypeError. 
]]

In general RangeErrors are better used when only an enumeration should be allowed and you want to throw when outside that range. See e.g. http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.normalize</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114554</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-11-05 12:46:06 +0000</bug_when>
    <thetext>String.prototype.normalize was defined after IDL enumerations which use TypeError...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114555</commentid>
    <comment_count>2</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2014-11-05 12:54:13 +0000</bug_when>
    <thetext>Hmm yeah this conversation is starting to feel familiar...

I will try to PR WebIDL to use RangeError and see where that discussion goes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114730</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-11-09 17:49:51 +0000</bug_when>
    <thetext>http://lists.w3.org/Archives/Public/www-international/2014OctDec/0091.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115005</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-11-17 14:42:00 +0000</bug_when>
    <thetext>https://github.com/whatwg/encoding/commit/811cf733af9aba3bcccc3d82d68298d375caac48</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>