Clone this wiki locally
MwClientError is the superclass (or ancestor) of all errors raised directly by mwclient, enabling you to easily separate them from exceptions thrown by the Python runtime or other libraries. It has no other special functionality.
try: run_my_tool() except MwClientError, e: print 'Unexpected mwclient error occurred: ' + e.__class__.__name__ print e.args
Note that mwclient invokes Python runtime libraries which may in some cases raise exceptions not derived from MwClientError.