Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 73A966324E0 for ; Sat, 1 May 2010 13:20:28 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 29107-05 for ; Sat, 1 May 2010 16:20:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by mail.postgresql.org (Postfix) with ESMTP id 2B4BE632190 for ; Sat, 1 May 2010 13:20:21 -0300 (ADT) Received: from mail63.csoft.net (localhost [127.0.0.1]) by mail63.csoft.net (Postfix) with ESMTP id 1A5482840A; Sat, 1 May 2010 12:20:20 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=csoft.net; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sel1; bh=3UxsugMyMX1Q6kDJ0gdhyt/3VRo=; b=MySVev HqCnInGJRHF+1kkFJhqTfuo9l4eFKWERUHLbk+9JzhNynpR0eZaU6uwp/UbLfPeI 1oEOiJw036tr31pERQ/iWRp9YQ8wlfoPO9jvoLVTDhEFGOQT9bl9yXPUPtpSXxbG tdNKbiwmv3yxL2p+1ODeF06Ak/LUy/TecXtYw= Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id 0E0E128405; Sat, 1 May 2010 12:20:20 -0400 (EDT) Received: by leary.csoft.net (Postfix, from userid 1112) id D556FA388; Sat, 1 May 2010 12:20:19 -0400 (EDT) Date: Sat, 1 May 2010 12:20:19 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: =?ISO-8859-15?Q?Maxime_L=E9vesque?= cc: pgsql-jdbc@postgresql.org Subject: Re: SQLException.getErrorCode ? In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSO 1167 2008-08-23) MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=AWL=0.000, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Archive-Number: 201005/11 X-Sequence-Number: 20495 On Sat, 1 May 2010, Maxime L?vesque wrote: > =A0The method=A0 SQLException.getErrorCode of the jdbc driver systematica= lly > returns 0, >=20 > =A0http://www.postgresql.org/docs/8.4/interactive/errcodes-appendix.html As I said earlier you need to check SQLException.getSQLState, not=20 getErrorCode. As you can see the error conditions listed in the appendix= =20 are not all numeric so they cannot be returned via getErrorCode. Kris Jurka=