Package Bio :: Package Application :: Class ApplicationError
[hide private]
[frames] | no frames]

Class ApplicationError

source code

              object --+            
                       |            
exceptions.BaseException --+        
                           |        
        exceptions.Exception --+    
                               |    
   subprocess.CalledProcessError --+
                                   |
                                  ApplicationError

Raised when an application returns a non-zero exit status.

The exit status will be stored in the returncode attribute, similarly the command line string used in the cmd attribute, and (if captured) stdout and stderr as strings.

This exception is a subclass of subprocess.CalledProcessError.

>>> err = ApplicationError(-11, "helloworld", "", "Some error text")
>>> err.returncode, err.cmd, err.stdout, err.stderr
(-11, 'helloworld', '', 'Some error text')
>>> print(err)
Non-zero return code -11 from 'helloworld', message 'Some error text'
Instance Methods [hide private]
 
__init__(self, returncode, cmd, stdout='', stderr='')
Initialize.
source code
 
__str__(self)
Format the error as a string.
source code
 
__repr__(self)
Represent the error as a string.
source code

Inherited from exceptions.Exception: __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __setattr__, __setstate__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

Method Details [hide private]

__init__(self, returncode, cmd, stdout='', stderr='')
(Constructor)

source code 
Initialize.
Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 
Format the error as a string.
Overrides: object.__str__

__repr__(self)
(Representation operator)

source code 
Represent the error as a string.
Overrides: object.__repr__