Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Saturday, October 17, 2026

Diff for libcfg+/doc/sgml/usage.error-codes.sgml between version 1.11 and 1.12

version 1.11, 2002/10/07 10:54:40 version 1.12, 2003/08/16 14:06:06
Line 1 
Line 1 
 <!-- $Platon: usage.error-codes.sgml,v 1.9 2002/09/02 15:01:06 nepto Exp $ -->  <!-- $Platon: libcfg+/doc/sgml/usage.error-codes.sgml,v 1.11 2002/10/07 10:54:40 rajo Exp $ -->
   
 <!-- MAN:  <!-- MAN:
         <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [          <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
Line 26 
Line 26 
 <!-- MAN: <refsect1><title>SYNOPSIS</title> -->  <!-- MAN: <refsect1><title>SYNOPSIS</title> -->
 <para>  <para>
   
 These functions are used for manipulation with &name; errors. Parsing context  The information about the last occurred error is stored within the context in
 (<structname>cfg_context</structname>) itself remembers last occured error in  the <structname>CFG_CONTEXT</structname> structure. The following functions
 internal data structures.  provide a convenient interface for interpreting, querying and printing that
   information.
   
 <funcsynopsis>  <funcsynopsis>
 <funcsynopsisinfo><![CDATA[#include <cfg+.h>]]></funcsynopsisinfo>  <funcsynopsisinfo><![CDATA[#include <cfg+.h>]]></funcsynopsisinfo>
Line 62  internal data structures.
Line 63  internal data structures.
 <!-- MAN: </refsect1><refsect1><title>DESCRIPTION</title> -->  <!-- MAN: </refsect1><refsect1><title>DESCRIPTION</title> -->
 <para>  <para>
   
 Function <function>cfg_print_error()</function> prints error message of last  The function <function>cfg_print_error()</function> prints an error message
 occured error. Similar function <function>cfg_fprint_error()</function> prints  describing the last error. To print the message to the specified stream, use
 error message to specified stream, which must be passed as second parameter  <function>cfg_fprint_error()</function>, which takes a stream pointer
 <parameter>fh</parameter>.  <parameter>fh</parameter> as its second argument.
   
 </para>  </para>
 <para>  <para>
   
 The last error manipulating function, <function>cfg_get_error_str()</function>,  Lastly, <function>cfg_get_error_str()</function>, returns an error message in
 returns error message string. String is dynamically allocated. It is  a dynamically allocated string. Be sure to free the memory taken by the string
 <constant>NULL</constant> terminated array of characters filled with error  when you do not need it anymore.
 message. Returned pointer must be freed using <function>free()</function> system  
 call.  
   
 <!-- DEPRECATED!  <!-- DEPRECATED!
 Second function returns pointer to local static buffer with error message.  Second function returns pointer to local static buffer with error message.
Line 85  work.
Line 84  work.
 </para>  </para>
 <para>  <para>
   
 In following <xref linkend="usage.error-codes.table"  The following <xref linkend="usage.error-codes.table"
 endterm="usage.error-codes.table.title"> table are defined possible error  endterm="usage.error-codes.table.title"> table describes the error constants
 constants returned by parsing function, which has been described in <xref  used by the parsing functions. See <xref linkend="usage.parsing"
 linkend="usage.parsing" endterm="usage.parsing.title"> chapter.  endterm="usage.parsing.title"> section for reference.
   
 </para>  </para>
 <para>  <para>
Line 104  linkend="usage.parsing" endterm="usage.p
Line 103  linkend="usage.parsing" endterm="usage.p
 </thead>  </thead>
 <tbody>  <tbody>
 <row>  <row>
         <entry>          <entry><constant>CFG_OK</constant></entry>
         <constant>CFG_OK</constant>          <entry>Everything is OK</entry>
         </entry>  
         <entry>OK, all is right</entry>  
 </row>  </row>
 <row>  <row>
         <entry>          <entry><constant>CFG_ERROR_NOARG</constant></entry>
         <constant>CFG_ERROR_NOARG</constant>          <entry>An argument is missing for the option</entry>
         </entry>  
         <entry>An argument is missing for an option</entry>  
 </row>  </row>
 <row>  <row>
         <entry>          <entry><constant>CFG_ERROR_NOTALLOWEDARG</constant></entry>
         <constant>CFG_ERROR_NOTALLOWEDARG</constant>          <entry>An argument is not allowed for the option</entry>
         </entry>  
         <entry>An argument is not allowed for an option</entry>  
 </row>  </row>
 <row>  <row>
         <entry>          <entry><constant>CFG_ERROR_BADOPT</constant></entry>
         <constant>CFG_ERROR_BADOPT</constant>          <entry>The option's argument could not be parsed</entry>
         </entry>  
         <entry>An option's argument could not be parsed</entry>  
 </row>  </row>
 <row>  <row>
         <entry>          <entry><constant>CFG_ERROR_BADQUOTE</constant></entry>
         <constant>CFG_ERROR_BADQUOTE</constant>  
         </entry>  
         <entry>Error in quotations</entry>          <entry>Error in quotations</entry>
 </row>  </row>
 <row>  <row>
         <entry>          <entry><constant>CFG_ERROR_BADNUMBER</constant></entry>
         <constant>CFG_ERROR_BADNUMBER</constant>          <entry>The option could not be converted to an appropriate numeric type</entry>
         </entry>  
         <entry>An option could not be converted to appropriate numeric type</entry>  
 </row>  </row>
 <row>  <row>
         <entry>          <entry><constant>CFG_ERROR_OVERFLOW</constant></entry>
         <constant>CFG_ERROR_OVERFLOW</constant>          <entry>A given numeric value was too big or too small</entry>
         </entry>  
         <entry>A given number was too big or too small</entry>  
 </row>  </row>
 <row>  <row>
         <entry>          <entry><constant>CFG_ERROR_MULTI</constant></entry>
         <constant>CFG_ERROR_MULTI</constant>          <entry>Multiple arguments used for an option that takes only one argument</entry>
         </entry>  
         <entry>Multiple arguments used for single option</entry>  
 </row>  </row>
 <row>  <row>
         <entry>          <entry><constant>CFG_ERROR_NOMEM</constant></entry>
         <constant>CFG_ERROR_NOMEM</constant>  
         </entry>  
         <entry>Not enough memory</entry>          <entry>Not enough memory</entry>
 </row>  </row>
 <row>  <row>
         <entry>          <entry>
         <constant>CFG_ERROR_STOP_STR</constant>,                  <constant>CFG_ERROR_STOP_STR</constant>,
         <constant>CFG_ERROR_STOP_STR_FOUND</constant>                  <constant>CFG_ERROR_STOP_STR_FOUND</constant>
         </entry>          </entry>
         <entry>Stop string was found</entry>          <entry>Stop string was found</entry>
 </row>  </row>
 <row>  <row>
         <entry>          <entry><constant>CFG_ERROR_NOEQUAL</constant></entry>
         <constant>CFG_ERROR_NOEQUAL</constant>          <entry>Equal sign expected on the line, but no one was found</entry>
         </entry>  
         <entry>No equal sign on the line</entry>  
 </row>  </row>
 <row>  <row>
         <entry>          <entry><constant>CFG_ERROR_UNKNOWN</constant></entry>
         <constant>CFG_ERROR_UNKNOWN</constant>  
         </entry>  
         <entry>An unknown option</entry>          <entry>An unknown option</entry>
 </row>  </row>
 <row>  <row>
         <entry>          <entry><constant>CFG_ERROR_FILE_NOT_FOUND</constant></entry>
         <constant>CFG_ERROR_FILE_NOT_FOUND</constant>          <entry>File not found</entry>
         </entry>  
         <entry>File not found error</entry>  
 </row>  </row>
 <row>  <row>
         <entry>          <entry><constant>CFG_ERROR_SEEK_ERROR</constant></entry>
         <constant>CFG_ERROR_SEEK_ERROR</constant>          <entry>Seek error (<function>fseek()</function>&nbsp;failure)</entry>
         </entry>  
         <entry>Seek error (fseek() failure)</entry>  
 </row>  </row>
 <row>  <row>
         <entry>          <entry><constant>CFG_ERROR_INTERNAL</constant></entry>
         <constant>CFG_ERROR_INTERNAL</constant>  
         </entry>  
         <entry>Internal error</entry>          <entry>Internal error</entry>
 </row>  </row>
 </tbody>  </tbody>
Line 201  linkend="usage.parsing" endterm="usage.p
Line 172  linkend="usage.parsing" endterm="usage.p
 </para>  </para>
 <para>  <para>
   
 All constants exist also in their shorter forms. Use <constant>_ERR_</constant>  All of the constants have an alternative, short form, which can be derived by
 substring in constant name instead <constant>_ERROR_</constant> substring. So  replacing <constant>_ERROR_</constant> with <constant>_ERR_</constant> in the
 for example you can use <constant>CFG_ERR_BADOPT</constant> as a substitution  name of the constant.  So for example you can use
 for <constant>CFG_ERROR_BADOPT</constant>.  <constant>CFG_ERR_BADOPT</constant> as a substitution for
   <constant>CFG_ERROR_BADOPT</constant>.
   
 </para>  </para>
   
 </sect1>  </sect1>
 <!-- MAN: </refsect1></refentry> -->  <!-- MAN: </refsect1></refentry> -->
   

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top