Product Documentation

FairCom Java & .NET Stored Procedures

Previous Topic

Next Topic

DhSQLException

Description

The DhSQLException class extends the general java.lang.Exception class to provide detail about errors in FairCom DB SQL statement execution. Any such errors raise an exception with an argument that is an SQLException class object. The getDiagnostics() method retrieves details of the error.

Constructors

public DhSQLException(int ecode, String errMsg)

Parameters

ecode

The error number associated with the exception condition.

errMsg

The error message associated with the exception condition.

The following example illustrates the DhSQLException() constructor to create an exception object called excep. It then throws the excep object under all conditions.

Example


CREATE PROCEDURE sp1_02()

BEGIN

// raising exception

DhSQLException excep = new DhSQLException(666,new String

("Entered the sp1_02 procedure"));

if (true)

throw excep;

END

TOCIndex