From f1547ccab10a41ac3d58aa49c540d5bb845507a1 Mon Sep 17 00:00:00 2001
From: "Karl O. Pinc" <kop@karlpinc.com>
Date: Sun, 24 Sep 2023 16:03:59 -0500
Subject: [PATCH v2 04/11] Describe how to raise an exception in the exception
 section

Most of this section is about managing program control flow, but the
section does not mention how to raise an exception anywhere.  This new
sentence says how, and provides a link into the section on raising
exceptions for those who want to know more.

Line break after end of sentence to simplify reading of future patches.
---
 doc/src/sgml/plpgsql.sgml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index 646d0305eb..3cecf7bbd9 100644
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -2765,8 +2765,11 @@ NOTICE:  row = {10,11,12}
 
     <para>
      By default, any error occurring in a <application>PL/pgSQL</application>
-     function aborts execution of the function and the
-     surrounding transaction.  You can trap errors and recover
+     function aborts execution of the function and the surrounding
+     transaction.
+     You can raise an exception and throw an error
+     with <link linkend="plpgsql-statements-raise">RAISE EXCEPTION ...</link>.
+     You can trap errors and recover
      from them by using a <command>BEGIN</command> block with an
      <literal>EXCEPTION</literal> clause.  The syntax is an extension of the
      normal syntax for a <command>BEGIN</command> block:
-- 
2.30.2

