Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: redesign exception Date: Mon, 27 Oct 2014 23:54:45 +0100 Lines: 21 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 5dRCCdARm+B8gt5zXxU+TAbtEQg+xGm00ko1pxtbhaCARxHBk= Cancel-Lock: sha1:jvH/X1AjcPw55LvHOuBCGymEnvI= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: Xref: csiph.com comp.lang.java.programmer:30218 On 27.10.2014 18:46, Leif Roar Moldskred wrote: > Basically because the JDBC API is old and pretty badly done. The lack of > good error mode descriptions at an appropriate level of abstraction is > just _one_ of the many issues it has. It really is time we got new and > improved API for database connections. I couldn't agree more! I have long waited for sub classes of SQLException that at least distinguish basic error classes, e.g. - SQLConnectionException: network or other connectivity issues - SQLConstraintException: trying to insert a duplicate PK - SQLResourceException: server could not fulfill the query because of lacking tmp tablespace, memory or what - SQLSyntaxException: should be obvious I think that would be enough to do a lot better error handling. Kind regards robert