MwClientError

Waldir Pimenta edited this page Nov 16, 2013 · 1 revision
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.

Subclasses:

Superclass: RuntimeError


This page was originally imported from the old mwclient wiki at SourceForge. The imported version was dated from 10:43, 21 February 2012, and its only editor was Derrickcoetzee (@dcoetzee).