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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>PetscExceptionTry1</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<A NAME="PetscExceptionTry1"><H1>PetscExceptionTry1</H1></A>
Runs the routine, causing a particular error code to be treated as an exception, rather than an error. That is if that error code is treated the program returns to this level, but does not call the error handlers Not Collective
<P>
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
PetscExceptionTry1(PetscErrorCode routine(....),PetscErrorCode);
</PRE>
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
PETSc must not be configured using the option --with-errorchecking=0 for this to work
<P>
Note: In general, the outer most try on an exception is the one that will be caught (that is trys down in
PETSc code will not usually handle an exception that was issued above). See <A HREF="../SNES/SNESSolve.html#SNESSolve">SNESSolve</A>() for an example
of how the local try is ignored if a higher (in the stack) one is also in effect.
<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/PetscError.html#PetscError">PetscError</A>(), <A HREF="../Sys/SETERRQ.html#SETERRQ">SETERRQ</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>(), <A HREF="../Sys/SETERRQ3.html#SETERRQ3">SETERRQ3</A>(),
<BR><A HREF="../Sys/CHKERRQ.html#CHKERRQ">CHKERRQ</A>(), <A HREF="../Sys/PetscExceptionCaught.html#PetscExceptionCaught">PetscExceptionCaught</A>(), <A HREF="../Sys/PetscExceptionPush.html#PetscExceptionPush">PetscExceptionPush</A>(), <A HREF="../Sys/PetscExceptionPop.html#PetscExceptionPop">PetscExceptionPop</A>()
<P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>advanced
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/sys/error/../../../include/petscerror.h.html#PetscExceptionTry1">src/sys/error/../../../include/petscerror.h</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>
<P><H3><FONT COLOR="#CC3333">Examples</FONT></H3>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex10.c.html">src/ksp/ksp/examples/tutorials/ex10.c.html</A><BR>
</BODY></HTML>
|