Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.swapon.de!aioe.org!.POSTED!not-for-mail From: Marketa Jadalova Newsgroups: comp.lang.java.programmer Subject: Re: redesign exception Date: Mon, 27 Oct 2014 16:55:55 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 14 Message-ID: References: <1d6fc97wumvl6$.316nwmuziazw.dlg@40tude.net> <6e29c258-9842-4c60-9d99-9929a92d7a96@googlegroups.com> <6429a7c1-3430-4897-aa9b-a9836d9d8a40@googlegroups.com> <5sednVQ7leDCSdDJnZ2dnUVZ8lWdnZ2d@giganews.com> NNTP-Posting-Host: F5lBACoFiVmN4OwR5oOCVg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla 3.04Gold (WinNT; U) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:30211 In article 5sednVQ7leDCSdDJnZ2dnUVZ8lWdnZ2d@giganews.com, Leif Roar Moldskred wrote: > There is a _reason_ why we abstract away the specific, vendor specific > error modes into a hierarcy of ever more generic error types: we want to > be able to react intelligently to errors even when we don't know what > the exact, low-level errors that can occur _are_. I'd be more interested in knowing why there are specific, vendor specific error modes for even those errors that can happen with every RDBMS. Including the OP's example of a primary key uniqueness constraint violation. Why is there not a standardized set of exception classes in, say, java.sql for the universal, vendor-independent errors? The existing chaining would still be needed to handle the rest, of course.