Logo Search packages:      
Sourcecode: calibre version File versions

def calibre::utils::pyparsing::ParserElement::setFailAction (   self,
  fn 
) [inherited]

Define action to perform if parsing fails at this expression.
   Fail acton fn is a callable function that takes the arguments
   fn(s,loc,expr,err) where:
    - s = string being parsed
    - loc = location where expression match was attempted and failed
    - expr = the parse expression that failed
    - err = the exception thrown
   The function returns no value.  It may throw ParseFatalException
   if it is desired to stop parsing immediately.

Definition at line 864 of file pyparsing.py.

00864                                  :
        """Define action to perform if parsing fails at this expression.
           Fail acton fn is a callable function that takes the arguments
           fn(s,loc,expr,err) where:
            - s = string being parsed
            - loc = location where expression match was attempted and failed
            - expr = the parse expression that failed
            - err = the exception thrown
           The function returns no value.  It may throw ParseFatalException
           if it is desired to stop parsing immediately."""
        self.failAction = fn
        return self


Generated by  Doxygen 1.6.0   Back to index