'Call the custom code hook function identified by \'hook_name\' if any,
and return the results'

def call_hook(self, hook_name, *args, **kwargs):

    try:
        code = self.get_hook(hook_name)
        if code:
            return code(*args, **kwargs)
    except Exception as e:
        original_message = ''
        if len(e.args):
            original_message = e.args[0]
        e.args = (("Error    in    '%s'    hook    '%s',    original    message:    %s" % (self.name, hook_name, original_message)),)
        raise
