Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Mystery error message to STDERR
Date: Jun 15 1999 6:09PM

Wechsler, Steven M writes:
 > I seem to be encountering an error message that the message handler is not
 > catching.  I'm doing a series of inserts into a table.  When I get a
 > duplicate, I get a 2601 (duplicate record) in the error handler; no mystery
 > there.  Immediately after that, I get a 3621 (command has been aborted),
 > again, no mystery.  Directly after that, though, I get the error text: 
 > DB-Library error:
 >         General SQL Server error: Check messages from the SQL Server
 > which is sent to STDERR.
 > I can't figure out where this message is coming from: it's not from either
 > the message handler (which sends all its output to STDOUT rather than
 > STDERR) or the error handler (which aborts the program).  Both handlers were
 > written by me, and are fairly simple (if message, check severity; print, set
 > flag and return as appropriate; if error, print message and exit).

It comes from the error handler. If the error is SYBEMSG then this is
the message that is printed. That's why the error handler in has

    if ($error != SYBESMSG) {
	print STDERR ("Sybase error: ", $error_msg, "\n");
	print STDERR ("OS Error: ", $os_error_msg, "\n") if defined ($os_error_msg);

Michael Peppler         -||-  Data Migrations Inc.    -||-
Int. Sybase User Group  -||-
Sybase on Linux mailing list: