[geeks] Apple applications phoning home
der Mouse
mouse at Rodents.Montreal.QC.CA
Tue Oct 23 15:10:05 CDT 2007
> My point is that in order to fail gracefully you some how have to
> know what to expect to catch the error in the first place.
If "error" means an unexpected return from some function, then you need
to do something sane when you get back anything you don't expect. This
is not rocket science.
If "error" means an exception thrown in the language sense, then you
need to establish a handler for "anything not otherwise caught"
exceptions. If the language doesn't permit that, you are using the
wrong language. This too is not rocket science.
> If someone throws something unexpected at it it's still going to
> fail.
Yes, but it should fail as in returning "something went wrong and I
don't recognize it" errors upstream, not as in crashing the whole
kernel. If you have to specifically code a catch for a thrown error to
prevent that error from crashing your kernel, you have a severely
misdesigned (for this purpose) language, driver interface, or both.
> a few vendors USB Audio devices caused issues that weren't caught by
> the code in that revision, so it downed the Kernel. As soon as Apple
> *knew* what was causing it a handler was issued to stop it happening,
> BUT they had to know *what to expect* to stop it happening.
This is catastrophically bad design. Anything not expected should have
been pushed upstream as a well-controlled "something weng wrong that I
don't recognize" error, not crashing the kernel. I don't know whether
this is because they picked the wrong language, because they
misdesigned the interfaces, because they misdesigned their error
handling paradigm, or what, but I can't see this as being anything but
Apple's fault.
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse at rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
More information about the geeks
mailing list