exceptions¶
This module’s scope covers exceptions.
-
tuna.console.exceptions.
output_exception
(error)[source]¶ This method’s goal is: to print information about the error raised as exception.
Parameters:
- error : exception
- A valid Python exception, such as one caught in a try / except loop.
Returns:
- message : string
- A string containing the error string and its traceback, similar to IPython’s output when an exception occurs.
Example:
try: tuna.io.read ( "non existing file name.fits" ) except Excetion as e: tuna.console.exceptions.output_exception ( e )