Progress
SQL-92
Guide and Reference


DhSQLException

Extends the general java.lang. exception class to provide detail about errors in 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

EXAMPLE

This example illustrates using the DhSQLException constructor to create an exception object called excep. It then throws the excep object under all conditions:

CREATE PROCEDURE sp1_02()
BEGIN
     // raising exception 
     DhSQLException excep = new DhSQLException(666,new String
          ("Entered the tst02 procedure"));
     if (true)
     throw excep;
END 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095