🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #1029

Re: Error Handling in Stored Procedures

#1029
From: Bill Todd
Date: Sat, 17 Mar 2007 19:14
22 lines
1962 bytes
Patrick Moloney wrote:

> 1. Apparently I have to list every exception I'd like to trap. I'd
> rather not have to make that list (and maintain it).  By default IB
> stops and displays any exception to the user. I just want to record
> any exception and continue with the next record.
> 2. I see no documentation on how to capture the exception message. The
> only thing I can devise is to list every exception in my When
> statement, (meaning I provide the exception name), then retrieve the
> message from the system tables using that name.


I have never tried the following but it might work.

WHEN ANY DO
  INSERT INTO LOGTBL (ERRORCODE) VALUES (GDSCODE);

You are correct that there is no way using SQL to get the message text
that corresponds to an error code. The error messages are not stored in
a system table.
-- 
Bill Todd (TeamB)
Technical Details
Message-ID: <45fc2ffc@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.motzarella.org!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <45fb1f50$1@newsgroups.borland.com> <45fb39ab$1@newsgroups.borland.com> <45fbe299$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,16fac437688a8716
X-Google-Attributes: gid114a0e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Bill Todd" <no@no.com>
Subject: Re: Error Handling in Stored Procedures
Newsgroups: borland.public.interbase.sql
References: <45fb1f50$1@newsgroups.borland.com> <45fb39ab$1@newsgroups.borland.com> <45fbe299$1@newsgroups.borland.com>
Organization: The Database Group, Inc.
User-Agent: XanaNews/1.18.1.6
X-Face: ":yn4zt^A_dn>6~{YJmu^B\'4w)e:apPM\VC=Dvf&*tASxX9|BYczkFd$xr.$vNSZ[3Uobr p]c4\+\l){!WQI.$]veP({HLd;CDYH?iN
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 216.207.211.19
Message-ID: <45fc2ffc@newsgroups.borland.com>
Date: 17 Mar 2007 11:14:20 -0800
X-Trace: newsgroups.borland.com 1174155260 216.207.211.19 (17 Mar 2007 11:14:20 -0800)
Lines: 22
X-Authenticated-User: btodd
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.motzarella.org!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail