Subject Custom error message from procedure/trigger code in Firebird 3.x dialect 3

Sometimes I need to write extended error message from the SQL procedure and trigger code. So far I have used the following procedure:

create or alter procedure REPORT_ERROR (MSG varchar(400))
  update rdb$exceptions set
  where rdb$exception_name='MY_ERROR';
  exception ERRMSG_;

But in Firebird 3.x UTF8/dialect 3 I am receiving the error message while using this function (even as SYSDBA user):

UPDATE operation is not allowed for system table RDB$EXCEPTIONS.

So - how can I report custom errors from the SQL procedures and 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.