<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Deprecating trigger_error calls in the Tarot cards?</title>
        <description>In some environments setting up your own PHP error_handler using set_error_handler() is not an option.  Have you considered converting all the trigger_error() calls to throw exceptions?

There are 51 locations that have trigger_error calls and 23 that throw *Exception in 4.2.0.

Is that a 5.x change? Or something that could be rolled into 4.3.x 4.4.0?</description>
        <link>http://htmlpurifier.org/phorum/read.php?5,5520,5520#msg-5520</link>
        <lastBuildDate>Wed, 22 May 2013 03:42:15 -0400</lastBuildDate>
        <generator>Phorum 5.2.18</generator>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?5,5520,5530#msg-5530</guid>
            <title>Re: Deprecating trigger_error calls in the Tarot cards?</title>
            <link>http://htmlpurifier.org/phorum/read.php?5,5520,5530#msg-5530</link>
            <description><![CDATA[<p>I'll accept a patch that converts trigger_errors that are E_USER_ERROR can be converted to exceptions with no configuration flag. A patch that converts E_USER_WARNING trigger_errors to exceptions would be more interesting... in particular, a configuration flag won't necessarily work because a lot of this errors /come/ from the configuration handling system.</p>]]></description>
            <dc:creator>Ambush Commander</dc:creator>
            <category>Internals</category>
            <pubDate>Mon, 11 Apr 2011 15:05:16 -0400</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?5,5520,5529#msg-5529</guid>
            <title>Re: Deprecating trigger_error calls in the Tarot cards?</title>
            <link>http://htmlpurifier.org/phorum/read.php?5,5520,5529#msg-5529</link>
            <description><![CDATA[<p>Just to be clear, would you be willing to consider a patch that converted all the <i>trigger_error()</i> calls to exceptions with a Configuration flag (default <i>false</i> so as to not change existing functionality)?  Or would you think that would clutter up the code?</p>]]></description>
            <dc:creator>Yzmir Ramirez</dc:creator>
            <category>Internals</category>
            <pubDate>Mon, 11 Apr 2011 14:48:36 -0400</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?5,5520,5526#msg-5526</guid>
            <title>Re: Deprecating trigger_error calls in the Tarot cards?</title>
            <link>http://htmlpurifier.org/phorum/read.php?5,5520,5526#msg-5526</link>
            <description><![CDATA[<p>Thank you.</p>]]></description>
            <dc:creator>Yzmir Ramirez</dc:creator>
            <category>Internals</category>
            <pubDate>Fri, 08 Apr 2011 17:21:31 -0400</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?5,5520,5525#msg-5525</guid>
            <title>Re: Deprecating trigger_error calls in the Tarot cards?</title>
            <link>http://htmlpurifier.org/phorum/read.php?5,5520,5525#msg-5525</link>
            <description><![CDATA[<p>Oh yes, iconv is another bastard w.r.t. errors. You can further assume that HTML Purifier will not throw exceptions on bad HTML. It will just do its best to clean it up :-)</p>]]></description>
            <dc:creator>Ambush Commander</dc:creator>
            <category>Internals</category>
            <pubDate>Fri, 08 Apr 2011 17:20:31 -0400</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?5,5520,5524#msg-5524</guid>
            <title>Re: Deprecating trigger_error calls in the Tarot cards?</title>
            <link>http://htmlpurifier.org/phorum/read.php?5,5520,5524#msg-5524</link>
            <description><![CDATA[<p>Yeah I saw you guys doing that.  You also do that around iconv.  You did that because even when using the @ character to surpress the error messages the error handler function is still called.  And then another you did to surpress the E_STRICT messages.  </p>

<p>Very nice solutions.</p>

<p>Ok so for now I will go with the assumption that really crappy HTML will not generate trigger_errors(), but instead throw an Exception that can be caught.</p>]]></description>
            <dc:creator>Yzmir Ramirez</dc:creator>
            <category>Internals</category>
            <pubDate>Fri, 08 Apr 2011 17:00:43 -0400</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?5,5520,5523#msg-5523</guid>
            <title>Re: Deprecating trigger_error calls in the Tarot cards?</title>
            <link>http://htmlpurifier.org/phorum/read.php?5,5520,5523#msg-5523</link>
            <description><![CDATA[<p>Bad HTML should never trigger a PHP warning. If it does, that is a definitive bug. (One caveat is that the DOM parser can emit errors; not our fault, but we overload the error handler temporarily to deal with this case.)</p>]]></description>
            <dc:creator>Ambush Commander</dc:creator>
            <category>Internals</category>
            <pubDate>Fri, 08 Apr 2011 16:57:01 -0400</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?5,5520,5522#msg-5522</guid>
            <title>Re: Deprecating trigger_error calls in the Tarot cards?</title>
            <link>http://htmlpurifier.org/phorum/read.php?5,5520,5522#msg-5522</link>
            <description><![CDATA[<p>Hmm...what I'm trying to do is capture the bad HTML could not be handled for whatever reason.  If it would be enough just to catch exceptions when in a production environment then that'll be golden.</p>

<p>I'm just concerned that when this is in a production environment that when there is some crazy-ass HTML passed that I couldn't log it and adjust the settings/filters accordingly.</p>]]></description>
            <dc:creator>Yzmir Ramirez</dc:creator>
            <category>Internals</category>
            <pubDate>Fri, 08 Apr 2011 16:40:08 -0400</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?5,5520,5521#msg-5521</guid>
            <title>Re: Deprecating trigger_error calls in the Tarot cards?</title>
            <link>http://htmlpurifier.org/phorum/read.php?5,5520,5521#msg-5521</link>
            <description><![CDATA[<p>Some of the trigger errors are warnings intended to let developers know that they need to update their code. An exception would not be appropriate in those circumstances.</p>

<p>Clearly fatal errors should be converted into exceptions. Patches welcome.</p>]]></description>
            <dc:creator>Ambush Commander</dc:creator>
            <category>Internals</category>
            <pubDate>Fri, 08 Apr 2011 16:33:24 -0400</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?5,5520,5520#msg-5520</guid>
            <title>Deprecating trigger_error calls in the Tarot cards?</title>
            <link>http://htmlpurifier.org/phorum/read.php?5,5520,5520#msg-5520</link>
            <description><![CDATA[<p>In some environments setting up your own PHP error_handler using <b>set_error_handler()</b> is not an option.  Have you considered converting all the trigger_error() calls to throw exceptions?</p>

<p>There are 51 locations that have trigger_error calls and 23 that throw *Exception in 4.2.0.</p>

<p>Is that a 5.x change? Or something that could be rolled into <s>4.3.x</s> 4.4.0?</p>]]></description>
            <dc:creator>Yzmir Ramirez</dc:creator>
            <category>Internals</category>
            <pubDate>Fri, 08 Apr 2011 16:10:48 -0400</pubDate>
        </item>
    </channel>
</rss>
