PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Why doesn't error_handler get called if errors occur inside a stored procedure?
Date: Dec 6 2001 1:16AM

Dave Aiello writes:
 > We are using Sybase::DBlib and setting message and error handlers using 
 > &dbmsghandle() and &dberrhandle().  It does not appear that either our message 
 > handler or our error handler are called if an error occurs inside a stored 
 > procedure we call via an sql exec statement using DBlib.  Why is that?

Actually the message handler should definitely get called. What type
of error are you seeing that doesn't do this?

 > Second, would our message and/or error handlers be called if the stored 
 > procedure contained a raiserror?

A raiserror will also be caught by the message handler, as will also
any PRINT statement in the proc.

Michael
-- 
Michael Peppler - Data Migrations Inc. - http://www.mbay.net/~mpeppler
mpeppler@peppler.org - mpeppler@mbay.net
International Sybase User Group - http://www.isug.com