<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – Error-handling functions</title>
    <link>/en/sql-reference/functions/error-handling-functions/</link>
    <description>Recent content in Error-handling functions on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/sql-reference/functions/error-handling-functions/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Sql-Reference: THROW_ERROR</title>
      <link>/en/sql-reference/functions/error-handling-functions/throw-error/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/error-handling-functions/throw-error/</guid>
      <description>
        
        
        &lt;p&gt;Returns a user-defined error message.&lt;/p&gt;
&lt;p&gt;In a multi-node cluster, race conditions might cause the order of error messages to differ.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;THROW_ERROR ( &lt;span class=&#34;code-variable&#34;&gt;message&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;message&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The VARCHAR string to return.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;Return an error message when a CASE statement is met:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE TABLE pitcher_err (some_text varchar);
CREATE TABLE
=&amp;gt; COPY pitcher_err FROM STDIN;
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself.
&amp;gt;&amp;gt; big foo value
&amp;gt;&amp;gt; bigger foo other value
&amp;gt;&amp;gt; bar another foo value
&amp;gt;&amp;gt; \.
=&amp;gt; SELECT (CASE WHEN true THEN THROW_ERROR(&amp;#39;Failure!!!&amp;#39;) ELSE some_text END) FROM pitcher_err;
ERROR 7137:  USER GENERATED ERROR: Failure!!!
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Return an error message when a CASE statement using &lt;a href=&#34;../../../../en/sql-reference/functions/match-and-search-functions/regular-expression-functions/regexp-like/#&#34;&gt;REGEXP_LIKE&lt;/a&gt; is met:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
=&amp;gt; SELECT (CASE WHEN REGEXP_LIKE(some_text, &amp;#39;other&amp;#39;) THEN THROW_ERROR(&amp;#39;Failure at &amp;#34;&amp;#39; || some_text || &amp;#39;&amp;#34;&amp;#39;) END) FROM pitcher_err;
ERROR 4566:  USER GENERATED ERROR: Failure at &amp;#34;bar another foo value&amp;#34;
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
  </channel>
</rss>
