Advanced Error Handling: Writing an Error Handling Class
Grok Headline matches for Advanced Error Handling: Writing an Error Handling Class
More on XML Error Handling
More on XML Error Handling
01/22/2004 02:56 AMI thought I'd respond to a few of the comments I received:
Many people suggested that there be a built-in validator in the
browser that could show the errors to the developer. The validators
basically break down into two types: obtrusive validators and
unobtrusive validators.
If the validator is unobtrusive, then I would argue that it won't
receive sufficient usage to make a difference. If the browser doesn't
impose a penalty of some kind, then there will be no incentive for the
author to correct mistakes.
I can see the value of an obtrusive validator, as long as the
obtrusive part was only checking well-formedness (i.e., really basic
mistakes).
(2) Some people pointed out that my own blog was not valid. I have
two responses to that:
(a) I am not arguing for perfectly valid XML documents. I am
arguing for well-formed XML documents. There is a difference.
I think asking that the page be well-formed is setting the bar fairly
low. For example, one of the current errors on this blog is that I
have two elements with the same id. While this makes the blog
invalid, it does not have any effect on the blog being well-formed.
At least I don't think it does. :)
(b) I'm illustrating a point, namely that I have no reason to make
the blog valid, given that browsers will display the blog anyway.
(3) People complained that I wasn't serving up XHTML. I can't
actually serve up XHTML if I want the blog to be displayable in all
browsers, including Safari, which still has sufficient issues with
XHTML that I can't make that switch yet.
(4) My comments on HTML error handling were largely
misinterpreted.
Some people thought I was attacking WinIE for its permissive
handling of HTML. I was not, and I'm glad others appreciated
that fact. Back in the 90s WinIE had to emulate the permissive
error handling of the then-dominant browser Netscape. They had no
choice if they wanted Web sites to be viewable as the designer
intended. They were in the same position then that Safari is in
now.
Nor am I suggesting that WinIE should become less tolerant of
malformed HTML, or that they are at fault for not doing so. That is
simply not a logical conclusion to have drawn from my previous
comments. You can't take a Web site (even a malformed one) that works
a certain way and suddenly refuse to render it or even render it
radically differently than before.
For HTML, this issue was resolved long ago in favor of permissive
error handling and recovery, and no modern browser is to blame for
that situation.
Others said a browser that handles malformed HTML is better than
one that does not, and if Safari doesn't handle all this malformed
HTML, then it's simply not as capable a browser.
What amused me about this comment is that there is no definition of
what it means to handle malformed HTML. As long as a browser shows
you something and doesn't crash, it has handled the malformed HTML.
What people don't understand is that you don't simply have to handle
the malformed HTML. You have to handle it in exactly the same way as
the Web browser that the site author designed for.
If you do not, you'll end up with different renderings of the same
page, which as I said before, constitute the largest set of rendering
differences between Web browsers. Perfect emulation is what makes
error recovery so difficult. If you allow grossly malformed pages,
then most XML on the Web will end up being grossly malformed (as is
the case with HTML today).
Once you have a Web full of grossly malformed XML, there will be
one dominant browser that designers will check to see if the site
looks ok. They will then make assumptions that other browsers will
recover from the malformation errors in precisely the same way and
will simply assume that it is the fault of the other browsers if they
don't.
Right now it is the responsibility of alternate browsers to emulate
the dominant browser's error recovery strategies, but there's simply
no reason to do that for XML as well.
Error handling in Web applications
Error handling in Web applications
12/02/2002 01:17 PMZend: PHP 101 - Error Handling in PHP
Zend: PHP 101 - Error Handling in PHP
02/01/2005 09:14 PMIn
Part 12 of
their PHP 101 series,
Zend the
latest editon posted -
Bugging Out
(Absolute Beginners: error handling).
History of XML Error Handling
History of XML Error Handling
01/18/2004 12:24 AMI encourage everyone to go and read Mark Pilgrim’s
remark
able overview of the history of XML error-handling. His summary is
In the end, Tim basically said “there are two camps here, they
both have good points, we aren’t going to convince each other on
this one” and then proceeded to compromise by doing it his way.
Mark’s selection of out-takes from the debate would seem to support
that narrative. Excuse me while I go off in a corner and shake off the
megalomania. Let’s get real: even my Mom wouldn’t believe that I
could single-handedly impose so fundamental a policy decision on this
large and passionate a community by saying “Make it so.” What
happened was, we had a really big, really long, really passionate
argument on the subject; the camps came to be called “Draconians”
and “Tolerants.” After this had gone on for some weeks and some
hundreds of emails, we
took a vote and the Draconians won 7-4. And indeed, some
among the Tolerants cried foul over that vote. This was a good example
of what we mean when we say “rough consensus” in that even those
on the short side of the vote were willing to defend the process and
the outcome; see
Hollander and
Sperberg-McQueen. Other interesting glimpses into this history
may be found
here and, giving the last word, as is appropriate, to Jon
Bosak,
here.
XML Error Handling in Web Browsers
XML Error Handling in Web Browsers
01/19/2004 12:39 AMI've been following the topic of XML error handling on Mark Pilgrim's blog with great
interest. Go read
this blog entry. Done? Good. Now go read this
blog entry.
Safari has draconian XML error handling. If the file isn't
well-formed, Safari won't display it. Mozilla does the same, which
should come as no surprise, since the two browsers use the same
open-source XML parser (expat).
I fall squarely into the draconian camp and agree with Tim Bray. Fully half of the bugs
I receive in WebCore are not bugs at all, but are essentially
differences in error handling and error recovery between Safari and
the dominant Web browser, WinIE. None of these issues occur with XML.
If we lived in a world where browsers could refuse to display
malformed content (with useful error notification of course so that
authors could easily repair their content), then all of these "bugs"
would simply disappear. I could focus my efforts on real DOM and CSS
bugs, and not have to waste my time emulating the behavior of
WinIE.
Relaxing restrictions on well-formedness is a slippery slope, and
where does it end? Consider all the "helpful" rules that exist in
HTML today thanks to early versions of Netscape and WinIE. Did you
know that any h1-h6 tag can close any other h1-h6 tag? Try it. Open
an h1, type some text and then put in a close h2. It will close up
the h1 in WinIE and Mozilla. (I haven't yet fixed this "bug" in
Safari.) Try specifying a close tag for a paragraph by itself.
You'll get an empty paragraph in Safari, Mozilla, and WinIE.
Of course the most complicated error recovery problem is residual
style, which I have blogged about at length. This "helpful feature" (note the
sarcasm) allows you to accidentally mis-nest style tags like the
italic and bold tags and basically treat HTML more like a stream of
"on/off" states than an actual tree structure. This feature is more a
by-product of primitive browsers from the 90s that didn't have true
DOMs than an actual intended error recovery system.
There's also the missing quotes problem, e.g., leaving a close
quote off a link href. Browsers employ complicated heuristics to try
to match up unclosed quotes that depend on the number of quotes in the
document, their positions, and other factors. Safari doesn't really
handle this problem that well yet, and it shouldn't have to.
The whole reason nearly all Web pages on the Internet are malformed
is because browsers let Web page authors get away with it. As long as
browsers are permissive in their error handling and recovery, Web
authors will continue to produce invalid Web pages, because they won't
even have any idea the pages they are authoring are invalid!
People in the error recovery camp then suggest ideas like icons in
the status bar, or error messages dumped to some obscure console, but
the average Web designer isn't going to know or care about validation
as long as WinIE displays the Web site adequately. The only way you
can make the average Web designer care is to get in his face with the
obvious errors. The browser has to make a face and refuse to eat the
swill that is being force-fed to it, or the average designer is simply
going to shrug and say, "Well, close enough."
The crux of the problem with implementing true error recovery is
that it must be unambiguous. Every Web browser has to recover from
malformed content in precisely the same way. This means that in order
for browsers to be tolerant of malformed content, there would have to
be a specification regarding how to handle all possible malformations.
This is virtually impossible to specify, so why waste time and energy
on it when creating well-formed XML files is so ridiculously
simple?
I think people who don't work on Web browsers for a living have no
concept of just how malformed the Web really is, so let me state this
as clearly as I can:
The #1 reason that HTML pages render incorrectly in alternate
browsers is because of differences in error handling and
recovery.
Error Handling, Apache and PHP
Error Handling, Apache and PHP
02/17/2003 08:07 AMError Handling, Apache and PHP
I'm on record as using this for my sites so here's a good tutorial
that I can endorse fully:
Using PHP and Apache, you can turn your "Page Not Found" messages into
more than bland error reports. You can serve an alternate page based
on the name of the page that was not found, create a page on the fly
from a database, or send an email about the missing page to a
webmaster. [_Go_]
How else do you think you got this beautiful picture? True there are
a lot more things I could have done with it (which are covered in this
tutorial).
The history of draconian error handling
in XML
The history of draconian error handling
in XML
01/17/2004 10:38 PMI suspect that most of the people discussing liberal XML parsing today
are unaware that Tim Bray was the singular force behind the "fail on
first error" behavior of XML. Virtually everyone in the XML working
group disagreed with him. (1939 words)
DotGeek: Error Checking and Handling
DotGeek: Error Checking and Handling
01/26/2004 08:28 AMWell, it looks like
DotGeek.org
is back up and already going with new content this week, including one
of their latest dealing with error checking and handling in your PHP
scripts.
'Not Found' Is Not An Option: Error
Handling and User Experience
'Not Found' Is Not An Option: Error
Handling and User Experience
07/14/2004 01:49 AMWebmasterBase Jul 14 2004 4:32AM GMT
Writing an Incident Handling and
Recovery Plan
Writing an Incident Handling and
Recovery Plan
03/24/2005 12:13 AMHotFix Watch: Win32 Error = 1072 error
appears after you change the SMS 2.0
Service account of a secondary site
HotFix Watch: Win32 Error = 1072 error
appears after you change the SMS 2.0
Service account of a secondary site
12/28/2004 07:03 PMMOF Error - Class has Instances
MOF Error - Class has Instances
08/22/2004 08:53 PMCliex32.dll Error 126 Error in
Wnmanual.log
Cliex32.dll Error 126 Error in
Wnmanual.log
06/18/2004 08:16 AMBuilding A Generic Error Reporting Class
In PHP
Building A Generic Error Reporting Class
In PHP
12/13/2002 06:23 PMThe traditional method of building dynamic, PHP-based Web
sites - mixing HTML elements with PHP code - can result in mangled Web
pages (and much user angst) if errors take place during script
execution. But yes, you can avoid the ugliness - plug in our handy
error
reporting class, which provides a simple way of trapping script errors
and generating consistent, user-friendly error screens.
xml handling tools
xml handling tools
08/15/2004 02:14 AMdelay of developping
i hope they get the handling for each
car different.....and
i hope they get the handling for each
car different.....and
08/15/2004 11:04 PMTechTree Aug 16 2004 2:49AM GMT
Handling RSS in the browser
Handling RSS in the browser
02/01/2005 09:34 PMTwo things slowing the understanding and adoption of RSS by mainstream
consumers are that feeds are rendered as raw XML
by the browser, meaning that someone clicking on a feed link
gets a lot of code they see as gibberish; and that subscribing to a
feed is usually a multi-step process of finding a feed, copying the
link, opening up the subscription mechanism of the feed reader, and
pasting the link in.
To solve both these problems some feed readers have created buttons
that can be placed on a web site for a one-click subscription to that
feed in the reader. Instead of getting code when you click it, you get
your feed in the feed client. Web-based readers take this a step
further in that you don’t even need a reader installed to for
the button to do you some good, so anyone who likes your content can
easily add it to My Yahoo for instance. This has lead to a
proliferation of “Subscribe with X” buttons on some sites
(indeed, look at how my feed
is rendered in the browser with a stylesheet and you’ll see
some of these buttons on the right).
Dave Winer has a problem with this, and rightly so. But his solution is a little heavy-handed. We don’t need
some big centralized service (or lots of little centralized services)
that process feeds and figure out how to make them work on the
end-user’s particular preferred setup.
Jeremy̵
7;s right in saying this is a client-side problem, not something
that needs to be solved at the server level, but the idea of creating
a single helper app that lets people easily add a feed to their
preferred aggregator still makes things too complex and shifts the
responsibility for improving the user experience away from where it
belongs: to the feed client itself.
There’s more than one client that can handle audio files on
the Web. When I click an audio file, I don’t get a bunch of
code, or some generic server- or client-side helper app figuring out
what I want to do with the file. What I get is the audio opening up in
Winamp, or Zinf, or Media Player, or whatever is the default player
for audio files on my server. This happens because my browser
recognizes that the file type it’s downloading has a default
action and the OS knows how to open a file in the player. With a PDF, the browser sees a content type of
application/pdf and opens the PDF in
whatever application the user has installed to handle PDF files. If I have more than one installed, then
the default one is used (default generally being whichever one I
installed last).
Feed readers need to do the same thing. When I install a desktop
reader, the reader should (perhaps optionally) find all the browsers
installed on the system and configure them to open files with a
content type of application/rss+xml in the reader. The reader then
does whatever with it, perhaps showing it to the user and allowing
them to subscribe.
Web based readers would need some sort of small install that would
redirect that request to them, just as web based mail clients like
Gmail need a small program to get mailto: links to open the web mail
composition widget.
Of course this would also require that everyone serve RSS as the same content type or for the readers to
handle multiple content types. Unfortunately the RSS spec doesn’t specify which content type
should be used, so people have made up their own, often different,
content types.
People often forget that many of the problems faced by RSS and Atom are not new. They’ve already
been solved, so instead of reinventing the wheel we should use the
existing standards.
Update: Joe Gregorio has mentioned this before and
describes in
technical terms how a reader can do exactly this with C# and
Windows for Atom. The concepts, however are applicable to and feed
format, programming language, and OS.
RFC: virus handling
RFC: virus handling
01/28/2004 03:36 PMThomas Zehetbauer (Jan 28 2004)
Simple IO Handling with IO::All
Simple IO Handling with IO::All
04/09/2004 04:00 PMPerl module author extraordinaire Brian Ingerson demonstrates his
latest creation. IO::All ties together almost all of Perl's IO
handling libraries in one neat, cohesive package.
Handling non-UTF-8 filename
Handling non-UTF-8 filename
06/05/2005 11:13 PMG_FILENAME_ENCODING variable and convenient filename functions work.
PHP Form Handling
PHP Form Handling
08/27/2004 02:13 PM
If your PHP program is a dynamic web page (and it probably is) and
your PHP program is dealing with user input (and it probably is), then
you need to work with HTML forms. David Sklar, author of Learning PHP
5, offers tips for simplifying, securing, and organizing your
form-handling PHP code.
Handling events in C#
Handling events in C#
10/01/2002 11:42 PMCNET Oct 1 2002 10:01PM ET
Event Handling In Java
Event Handling In Java
10/28/2003 11:06 PM
In life, you encounter events that force you to suspend other
activities and respond to them immediately. In Java, events represent
all activity that goes on between the user and the application. Java's
Abstract Windowing Toolkit (AWT) communicates these actions to the
programs using events.
Handling Web services with care
Handling Web services with care
12/07/2003 09:25 AMSterling Commerce senior VP Terry Noreault says caution should still
be the byword for IT managers weighing their next move.
Handling optional parameters in C#
Handling optional parameters in C#
09/20/2002 11:24 PMCNET Sep 20 2002 10:02PM ET
Exception handling in Java
Exception handling in Java
05/27/2004 12:16 AMNo, this isn't yet another rant on checked vs non-checked exceptions.
It's just a link to an excellent article on exception handling by
Heinz Kabutz. Heinz drew me into reading the article with the very
first sentence (which I completely agree with): In my experience, all
Java projects contain poorly written exception handling code. He then
shows how exception handling... (176 words)
New refuse handling systems in HK
New refuse handling systems in HK
06/18/2004 12:25 AMContent.sina.com - Thu Jun 17, 08:32 pm GMT
Variable Handling and the PHP Novice
Variable Handling and the PHP Novice
06/26/2002 01:01 PMIn the beginning, the file was void, and without text. The Programmer
brought text to the file by saying "Let there be hello world" and
there was hello world, and it was good. But soon hello world was not
as good as it once was, and the Programmer said "let there be change!"
And where there once was static content in the file, there was now
variable content. Beholding the creation, the Programmer was happy,
and all was well...
Event handling in php web applications
Event handling in php web applications
01/25/2003 12:45 AMAn interesting discussion triggered on sitepoint forums, regarding
approaches to event handling in PHP applications. Theres a lot of
cross-over here from the paradigm of object oriented 'enterprise'
architecture, and it perhaps indicates an increasing shift in the way
that the PHP language is being used.
Exception Handling In DTML
Exception Handling In DTML
08/21/2002 06:08 PMEver wondered if there was a way to stop Zope from barfing
error messages all over your screen when one of your scripts crashes
and
burns? Well, guess what - there is! Meet the
and
tags, which can be used to trap and resolve errors in
script execution.
Strategies for handling nulls in SQL
Server
Strategies for handling nulls in SQL
Server
01/25/2003 02:50 AM
CNET Jan 25 2003 1:29AM ET
Re: Linux ISO9660 handling flaws
Re: Linux ISO9660 handling flaws
03/19/2005 03:11 AM
Dan Yefimov (Mar 17 2005)
Builder.com: Handling Multiple Submits
in PHP
Builder.com: Handling Multiple Submits
in PHP
07/01/2004 08:47 AM
From Builder.com, there's a new posting for anyone out there trying to figure out how
to handle
multiple submits in the same form.
Handling fatal and parse errors in PHP
Handling fatal and parse errors in PHP
12/02/2002 11:15 AM
PHP has a decent mechanism for error handling, but its implementation
has one fatal flaw: it doesn't work with all errors. Some errors
(namely, fatal and parse errors) simply slip through directly to the
user. Fortunately, there are ways to overcome this problem: I will
show you a trick to catch all errors.
Offshoring: How India is handling the
backlash
Offshoring: How India is handling the
backlash
05/06/2004 07:19 AM
Digital Agenda In contrast to the heated reaction from some U.S.
workers, the country most associated with offshoring is subdued and
puzzled by the opposition that has arisen.
PHP Magazine: Handling Multilingual
Sites
PHP Magazine: Handling Multilingual
Sites
12/04/2003 08:30 AM
The PHP Magazine has a nice link
this morning to a thread on the NyPHP mailing list about creating multilingual sites and some of the problems that might
arrise.
UN Concerned by U.S. Handling of Asylum
Seekers
UN Concerned by U.S. Handling of Asylum
Seekers
08/13/2004 09:18 PM
Reuters via Wired News Aug 14 2004 1:33AM GMT
Met Police updates 999 call handling
Met Police updates 999 call handling
02/18/2004 07:33 AM
Personal Computer World Feb 18 2004 11:46AM GMT
Linux ISO9660 handling flaws
Linux ISO9660 handling flaws
03/19/2005 03:11 AM
Michal Zalewski (Mar 17 2005)
Grok Description matches for Advanced Error Handling: Writing an Error Handling Class
GrokA matches for Advanced Error Handling: Writing an Error Handling Class
Sony DPP-FP30
Sony DPP-FP30
08/21/2004 08:39 PM
TechTree Aug 21 2004 11:49PM GMT
"0x800CCC69 SMTP_550_MAILBOX_NOT_FOUND"
error message
"0x800CCC69 SMTP_550_MAILBOX_NOT_FOUND"
error message
08/22/2004 09:25 AM
Direct and Related
Links for '“0x800CCC69 SMTP_550_MAILBOX_NOT_FOUND” error
message'
“SYMPTOMS When you use Microsoft Outlook or Microsoft Outlook
Express on a computer that is running Microsoft Windows XP Home
Edition to send a new e-mail message, you may experience the following
symptoms: * In Outlook, you may receive the following error message:
Unable to deliver the message due to a communication failure
……… 503 Sender already specified. * In Outlook
Express, you may receive the following error message: error:
0x800CCC69 SMTP_550_MAILBOX_NOT_FOUND CAUSE This issue…
Linux X10 Universal Device Driver 2.0.7
(Linux 2.4.x and 2.6.x.)
Linux X10 Universal Device Driver 2.0.7
(Linux 2.4.x and 2.6.x.)
08/10/2004 02:38 PM
A device driver for X10 home automation for script access.
Linux X10 Universal Device Driver 2.0.6
(Linux 2.4.x and 2.6.x.)
Linux X10 Universal Device Driver 2.0.6
(Linux 2.4.x and 2.6.x.)
07/06/2004 04:57 PM
A device driver for X10 home automation for script access.
SMS FAQ: Error Message: Could Not Write
Registry Key to HKLM...\Sites\ on
computer
SMS FAQ: Error Message: Could Not Write
Registry Key to HKLM...\Sites\ on
computer
09/06/2004 01:39 AM
Executive Calls Vote-Machine Letter an
Error
Executive Calls Vote-Machine Letter an
Error
05/12/2004 02:56 AM
The top executive at Diebold Inc., which makes voting machines, said
that it had been a "huge mistake" for him to express support for
President Bush's re-election in a fund-raising letter.
HotFix Watch: Stop error message when
you install Virtual PC Additions and SMS
client components on a Windows NT
4.0-based virtual machine
HotFix Watch: Stop error message when
you install Virtual PC Additions and SMS
client components on a Windows NT
4.0-based virtual machine
09/08/2004 07:55 PM
A solution for iPhoto's 'Not enough Disk
Space' error
A solution for iPhoto's 'Not enough Disk
Space' error
04/12/2004 10:11 AM
Recently, I tried to export 800 images (<1G) from iPhoto 4.0.1 and
got the message that I had insufficient disk space to complete the
operation despite having 20G free on my HD.
I checked the internet to look for others...
ATI Linux Driver 3.9.0
ATI Linux Driver 3.9.0
05/28/2004 09:31 PM
rt2400 Linux Driver
rt2400 Linux Driver
04/26/2004 07:40 AM
Initial BETA source code release
HP OfficeJet Linux driver 0.91
HP OfficeJet Linux driver 0.91
11/06/2003 12:45 AM
Linux support for most HP multi-function peripherals.
The Linux Tulip driver
The Linux Tulip driver
08/17/2004 09:10 AM
Files removed from tulip project
ATI Proprietary Linux Driver 3.11.1
ATI Proprietary Linux Driver 3.11.1
08/05/2004 04:20 PM
New Linux driver for XGI Volari V5, V8
and Z7
New Linux driver for XGI Volari V5, V8
and Z7
04/09/2005 06:26 PM
New nVidia Linux driver
New nVidia Linux driver
07/01/2004 10:29 AM
Linux AT91RM9200 UDP Driver
Linux AT91RM9200 UDP Driver
04/07/2005 05:18 AM
Working... release soon.
Advanced Error Handling: Writing an Error Handling Class