Developer designed error messages

From: Hank Robinson <cudau_at_csv.warwick.ac.uk>
Date: 22 Jul 1994 23:49:09 +0100
Message-ID: <30pid5$86p_at_crocus.csv.warwick.ac.uk>


This may sound like a newby question for a DBA, but...

Is there any way in which I can associate one-line error messages, that I specify, to particular constraints, etc. I have a largish (many-tabled) schema, with many constraints (all of which I name). It would be nice to get Oracle to give me (and others less experienced) meaningful error messages rather than "Contraint such n' such violated". It would, of course, be easy to write a simple non-Oracle (shell/perl/oraperl/C) script to do this, but I guess this would mean that the end-user would have to run it whenever he/she sees a particular type of Oracle error message (a bit like oerr), and that whenever I altered the structure then I would have to separately alter the bank of error messages. I want to be able to get the Oracle engine to give the useful error message directly, and avoid some interpretation stage, by somehow storing the useful message alongside the constraint.

Hank Robinson.
Oracle DBA,
University of Warwick. Received on Sat Jul 23 1994 - 00:49:09 CEST

Original text of this message