Previous | Next
Topic: Getting utPLSQL to work under Unix
Conf: 537, Msg: 37946
From: Richard Li (richardl@arsdigita.com)
Date: 9/22/00 01:53 PM
Getting utPLSQL to work under Unix Richard Li richardl@arsdigita.com richardl@arsdigita.com
A corallary observation of the above is that an integrity constraint compile error that throws an exception will make the package return SUCCESS. The code:
procedure new
is
begin
dbms_output.put_line('calling new!');
utassert.eq (
'Creating a new test object',
acs_object.new(100, 'test_object'),
100
);
dbms_output.put_line('exiting new!');
end;
results in:
SQL> exec utplsql.test('acs_object');
exec utplsql.test('acs_object');
Compile error: User-Defined Exception
Compile error: User-Defined Exception
calling new!
Compile Error "ORA-02291: integrity constraint (RICHARD.ACS_OBJECTS_OBJECT_TYPE_
FK) violated - parent key not found" on:
BEGIN ut#acs_object.new; END;
SUCCESS: Package "acs_object"
tearing down!
Note that the second put_line doesn't get executed, and the SUCCESS message.