raise Statement: raise [SomeException [, args [, traceback]]] : raise « Statement « Python Tutorial






import exceptions, sys

class ConfigError (exceptions.Exception):
    def __init__(self, arg=None):
        self.args = arg

raise ConfigError, "Invalid header."








3.15.raise
3.15.1.raise Statement: raise [SomeException [, args [, traceback]]]
3.15.2.Raise value error
3.15.3.Raise error from function
3.15.4.raise ZeroDivisionError
3.15.5.raise exception-type