Chapter 5 C Routines Reference
Send an error message to the calling client application from a C component.
#include <jagpublic.h>
JagStatus JagSendMsg(
JagSeverity severity,
SQLINTEGER errnum,
SQLPOINTER msgtext)
severity
Must be JAG_SEVERITY_ERROR.
errnum
An integer code for the error.
msgtext
A null-terminated string containing a description of the error.
JAG_SUCCEED for successful execution.
If an error occurs, JagSendMessage writes error descriptions to the server log file and returns JAG_FAIL.
JagSendMessage sends an error message to the client application that invoked the currently executing method. JagSendMessage provides a C facility similar to Java exceptions.
Note
Do not call JagSendMsg in C++ components.
Instead, throw a user-defined or CORBA system exception.
JagSendMessage should be called only to describe errors that prevent successful completion of a method call. JagSendMessage causes an exception to be thrown in a Java or ActiveX client; in these clients, the exception may preempt the arrival of INOUT parameter values. To return additional status information from a successful call, use additional INOUT parameters.
JagSendMessage should be called only once per method execution, because clients may not be able to process more than one message.
Clients process the received message differently depending on the type of client:
"Handle Errors in Your C Component" in the Jaguar CTS Programmer's Guide
Copyright © 2000 Sybase, Inc. All rights reserved. |
![]() |