<!--
* 
*
*  ProLinga-Doc
*
*  Copyright (C) 2002-2008 Xobas Software.
*  All rights reserved.
*  
*  This file is part of ProLinga-Doc.
*
*  ProLinga-Doc is free software: you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation, either version 3 of the License, or
*  (at your option) any later version.
*
*  ProLinga-Doc is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with ProLinga-Doc.  If not, see <http://www.gnu.org/licenses/>.
*
*  More information is available at the following addresses:
*
*  Website     : http://www.prolinga.org
*
*  Email       : prolinga-list@prolinga.org
*
*
-->
<refentry id="cmd_error">
  <refmeta>
    <refentrytitle>ERROR Command</refentrytitle>
    <manvolnum>1</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>ERROR</refname>
    <refpurpose>Display an error message.</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>ERROR</command>
      <arg choice='plain'><replaceable>data_ref</replaceable></arg>
      <arg rep='repeat' choice='opt'><replaceable>data_ref</replaceable></arg>
      <arg choice='opt'>
        <arg choice='plain'><option>SEVERITY</option></arg>
        <group choice='req'>
          <arg choice='plain'><option>Info</option></arg>
          <arg choice='plain'><option>Warning</option></arg>
          <arg choice='plain'><option>Question</option></arg>
          <arg choice='plain'><option>Error</option></arg>
        </group>
      </arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>ERROR</command>
      <arg choice='plain'><option>NAME</option></arg>
      <arg choice='plain'><replaceable>error_name</replaceable></arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1 id="cmd_error_introduction">
    <title>Introduction</title>
    <para>
      The <link linkend="cmd_error">ERROR</link> command displays an error on 
      the screen. If no SEVERITY is given, the default SEVERITY "Error" will 
      be used.
    </para>
  </refsect1>
  <refsect1 id="cmd_error_arguments">
    <title>Arguments</title>
    <variablelist>
      <varlistentry>
	<term><replaceable>data_ref</replaceable></term>
	<listitem>
	  <simpara>
            Any single data reference, including hard coded strings and 
            numeric values.
	  </simpara>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><replaceable>error_name</replaceable></term>
	<listitem>
	  <simpara>
            The name of a predefined error object in the repository.
	  </simpara>
	</listitem>
      </varlistentry>
    </variablelist>
    <note>
      In case of the severity being "Question", then the user selection
      value can be retrieved using built-in function ERRORRETURN(). It
      will contain the value 0 if the user accepted (= pressed Ok or
      Yes button) the screen and 1 if the user did not (= pressed
      Cancel, No, Close button) accept the screen.
    </note>

  </refsect1>

  <refsect1 id="cmd_error_example">
    <title>Example</title>
<programlisting>
. . .
. . .
ERROR "Can not find the system configuration file." SEVERITY Warning
. . .
. . .
ERROR NAME ConfirmDelete
. . .
. . .
</programlisting>
  </refsect1>

  <refsect1 id="cmd_error_related">
    <title>Related Commands</title>
    <para>
      None.
    </para>
  </refsect1>

</refentry>

