"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "docs/users_guide/errorHandling.rst" between
cheetah3-3.1.0.tar.gz and cheetah3-3.2.0.tar.gz

About: Cheetah3 is a template engine and code generation tool for e.g. for Web development or Java, SQL, LaTeX, form email ... (written in Python).

errorHandling.rst  (cheetah3-3.1.0):errorHandling.rst  (cheetah3-3.2.0)
Error Handling Error Handling
============== ==============
(errorHandling)
There are two ways to handle runtime errors (exceptions) in There are two ways to handle runtime errors (exceptions) in
Cheetah. The first is with the Cheetah directives that mirror Cheetah. The first is with the Cheetah directives that mirror
Python's structured exception handling statements. The second is Python's structured exception handling statements. The second is
with Cheetah's {ErrorCatcher} framework. These are described with Cheetah's {ErrorCatcher} framework. These are described
below. below.
#try ... #except ... #end try, #finally, and #assert #try ... #except ... #end try, #finally, and #assert
---------------------------------------------------- ----------------------------------------------------
(errorHandling.directives)
Cheetah's exception-handling directives are exact mirrors Python's Cheetah's exception-handling directives are exact mirrors Python's
exception-handling statements. See Python's documentation for exception-handling statements. See Python's documentation for
details. The following Cheetah code demonstrates their use: details. The following Cheetah code demonstrates their use:
:: ::
#try #try
$mightFail() $mightFail()
#except #except
It failed It failed
skipping to change at line 63 skipping to change at line 59
#finally #finally
$cleanup() $cleanup()
#end try #end try
Like Python, {#except} and {#finally} cannot appear in the same Like Python, {#except} and {#finally} cannot appear in the same
try-block, but can appear in nested try-blocks. try-block, but can appear in nested try-blocks.
#errorCatcher and ErrorCatcher objects #errorCatcher and ErrorCatcher objects
-------------------------------------- --------------------------------------
(errorHandling.errorCatcher)
Syntax: Syntax:
:: ::
#errorCatcher CLASS #errorCatcher CLASS
#errorCatcher $PLACEHOLDER_TO_AN_ERROR_CATCHER_INSTANCE #errorCatcher $PLACEHOLDER_TO_AN_ERROR_CATCHER_INSTANCE
{ErrorCatcher} is a debugging tool that catches exceptions that {ErrorCatcher} is a debugging tool that catches exceptions that
occur inside {$placeholder} tags and provides a customizable occur inside {$placeholder} tags and provides a customizable
warning to the developer. Normally, the first missing namespace warning to the developer. Normally, the first missing namespace
 End of changes. 3 change blocks. 
6 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)