1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>PetscError</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<A NAME="PetscError"><H1>PetscError</H1></A>
Routine that is called when an error has been detected, usually called through the macro <A HREF="../Sys/SETERRQ.html#SETERRQ">SETERRQ</A>().
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petsc.h"
int PetscError(int line,char *func,char* file,char *dir,int n,int p,char *mess,...)
</PRE>
Not Collective
<P>
<H3><FONT COLOR="#CC3333">Input Parameters</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>line </B></TD><TD>- the line number of the error (indicated by __LINE__)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>func </B></TD><TD>- the function where the error occured (indicated by __FUNCT__)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>dir </B></TD><TD>- the directory of file (indicated by __SDIR__)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>file </B></TD><TD>- the file in which the error was detected (indicated by __FILE__)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mess </B></TD><TD>- an error text string, usually just printed to the screen
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n </B></TD><TD>- the generic error number
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>p </B></TD><TD>- 1 indicates the error was initially detected, 0 indicates this is a traceback from a
previously detected error
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mess </B></TD><TD>- formatted message string - aka printf
</TD></TR></TABLE>
<P>
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
Most users need not directly use this routine and the error handlers, but
can instead use the simplified interface <A HREF="../Sys/SETERRQ.html#SETERRQ">SETERRQ</A>, which has the calling
sequence
<pre>
<A HREF="../Sys/SETERRQ.html#SETERRQ">SETERRQ</A>(n,mess)
</pre>
<P>
Experienced users can set the error handler with <A HREF="../Sys/PetscPushErrorHandler.html#PetscPushErrorHandler">PetscPushErrorHandler</A>().
<P>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
<A HREF="../Sys/PetscTraceBackErrorHandler.html#PetscTraceBackErrorHandler">PetscTraceBackErrorHandler</A>(), <A HREF="../Sys/PetscPushErrorHandler.html#PetscPushErrorHandler">PetscPushErrorHandler</A>(), <A HREF="../Sys/SETERRQ.html#SETERRQ">SETERRQ</A>(), <A HREF="../Sys/CHKERRQ.html#CHKERRQ">CHKERRQ</A>(), <A HREF="../Sys/CHKMEMQ.html#CHKMEMQ">CHKMEMQ</A>(), <A HREF="../Sys/SETERRQ1.html#SETERRQ1">SETERRQ1</A>(), <A HREF="../Sys/SETERRQ2.html#SETERRQ2">SETERRQ2</A>()
<BR><P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>intermediate
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/sys/src/error/err.c.html#PetscError">src/sys/src/error/err.c</A>
<BR><A HREF="./index.html">Index of all Sys routines</A>
<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
<BR><A HREF="../singleindex.html">Index of all manual pages</A>
</BODY></HTML>
|