How to create Custom Exception

Custom Exception Classes

We can create our exception class by subclassing Exception class.


class SomeCustomException(Exception): pass 




















Home »
  Python »
    Advanced Features »




Exception Handling
File
Module