<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9"> <TITLE> {The S-lang C Library Reference}: SLang_exit_error</TITLE> <LINK HREF="cref-55.html" REL=next> <LINK HREF="cref-53.html" REL=previous> <LINK HREF="cref.html#toc54" REL=contents> </HEAD> <BODY> <A HREF="cref-55.html">Next</A> <A HREF="cref-53.html">Previous</A> <A HREF="cref.html#toc54">Contents</A> <HR> <H2><A NAME="SLang_exit_error"></A> <A NAME="s54">54. <B>SLang_exit_error</B></A></H2> <P> <DL> <DT><B> Synopsis </B><DD><P>Exit the program and display an error message <DT><B> Usage </B><DD><P><CODE>void SLang_exit_error (char *fmt, ...)</CODE> <DT><B> Description </B><DD><P>The <CODE>SLang_exit_error</CODE> function terminates the program and displays an error message using a <CODE>printf</CODE> type variable argument list. The default behavior to this function is to write the message to <CODE>stderr</CODE> and exit with the <CODE>exit</CODE> system call. <P>If the the function pointer <CODE>SLang_Exit_Error_Hook</CODE> is non-NULL, the function to which it points will be called. This permits an application to perform whatever cleanup is necessary. This hook has the prototype: <BLOCKQUOTE><CODE> <PRE> void (*SLang_Exit_Error_Hook)(char *, va_list); </PRE> </CODE></BLOCKQUOTE> <DT><B> See Also </B><DD><P><CODE>SLang_verror, exit</CODE> </DL> <P> <P> <P> <HR> <A HREF="cref-55.html">Next</A> <A HREF="cref-53.html">Previous</A> <A HREF="cref.html#toc54">Contents</A> </BODY> </HTML>