🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Error Handling in Stored Procedures

#1026
From: Patrick Moloney
Date: Fri, 16 Mar 2007 23:50
15 lines
1641 bytes
Does anyone know how to trap exceptions in a stored procedure? I want
to process a bunch of records and not stop because one record fails.
Most of the documentation talks about processing by SqlCode.  I'm
trying to handle my own exceptions.
In particular, how can I get the message that would otherwise be
displayed. I want to put it in a variable so I can store it someplace.
Also, is it necessary to code for each exception that I want to trap?
That's how I read the documentation, such that it is.  While I may know
the exceptions most directly related to the process I'm working on, for
a complex system, a lot of unexpected exceptions could pop up.  And
having to fix up this code down the road when somebody creates another
exception would be impossible.

-- 
Patrick Moloney
Technical Details
Message-ID: <45fb1f50$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,16fac437688a8716,start
X-Google-Attributes: gid114a0e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Patrick Moloney" <NewsID*at*SandrockSoftware.c*o*m>
Subject: Error Handling in Stored Procedures
Newsgroups: borland.public.interbase.sql
Reply-To: "Patrick Moloney" <NewsID@SandrockSoftware.com>
User-Agent: XanaNews/1.18.1.3
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 151.204.132.253
Message-ID: <45fb1f50$1@newsgroups.borland.com>
Date: 16 Mar 2007 15:50:56 -0800
X-Trace: newsgroups.borland.com 1174085456 151.204.132.253 (16 Mar 2007 15:50:56 -0800)
Lines: 15
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail