Subject | Re: [firebird-support] Custom error message from procedure/trigger code in Firebird 3.x dialect 3 |
---|---|
Author | Helen Borrie |
Post date | 2018-10-07T18:34:07Z |
jonatan.lauritsen@... wrote:
v.3.0 onward are read-only, meaning, amongst other things, you can no
longer circumvent the restriction on performing DDL operations in PSQL
by hitting the system tables directly.
associated with an exception with a run-time message of up to approx.
1000 characters (ascii) or around 250 (UTF-8). See
https://www.firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html/fblangref25-psql-handleexceptions.html#fblangref25-psql-exception
---
This email has been checked for viruses by AVG.
https://www.avg.com
> Sometimes I need to write extended error message from the SQLThis was always a hack...
> procedure and trigger code. So far I have used the following procedure:
> create or alter procedure REPORT_ERROR (MSG varchar(400))as
> BEGIN
> update rdb$exceptions set
> rdb$message=:MSG where rdb$exception_name='MY_ERROR';
> exception ERRMSG_;
> END
> But in Firebird 3.x UTF8/dialect 3 I am receiving the error messageAnd here's where the hack comes back to bite you. System tables from
> while using this function (even as SYSDBA user):
> UPDATE operation is not allowed for system table RDB$EXCEPTIONS.
v.3.0 onward are read-only, meaning, amongst other things, you can no
longer circumvent the restriction on performing DDL operations in PSQL
by hitting the system tables directly.
> So - how can I report custom errors from the SQL procedures andSince around v.2.0, you have been able to replace the default message
> triggers, it would be nice the generate some information in
> procedures and triggers and let the Delphi error-handling code to
> process this information for the user presentation.
associated with an exception with a run-time message of up to approx.
1000 characters (ascii) or around 250 (UTF-8). See
https://www.firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html/fblangref25-psql-handleexceptions.html#fblangref25-psql-exception
---
This email has been checked for viruses by AVG.
https://www.avg.com