v1.1.0
were added two more methods to comberloader,
failback
and fail
.
fail
Use this handler in case the module fails to import
import comberload
comberload("mod1", "mod2")
def first():
pass
@first.fail
def second(e):
pass
failback
This is what I advice to use, it uses the default handler in case the module is
not loaded due to error or any else.
import comberload
comberload("mod1", "mod2")
def first():
pass
@first.failback
def second(e=None): # e will be passed if module fails to load
pass