Exceptional Arguments

exception may have arguments are passed along to the exception handler when they are raised. When an exception is raised, parameters are generally provided as an additional aid for the exception handler. Although arguments to exceptions are optional, the standard built-in exceptions do provide at least one argument, an error string indicating the cause of the exception.
 
Exception parameters can be ignored in the handler, but the Python provides syntax for saving this value. To access any provided exception argument, you must reserve a variable to hold the argument. This argument is given on the except header line and follows the exception type you are handling. The different syntaxes for the except statement can be extended to the following:

Example

# single exception
except
Exception
Argument:
    suite_for_Exception_with_Argument
# multiple exceptions
except (Exception1, Exception2, …, ExceptionN), Argument:
    suite_for_Exception1_to_ExceptionN_with_Argument