'Log, raise if debugging; log and show html message if not.'

def _handle_plugin_error(self, trans, visualization_name, exception):

    log.exception('error    rendering    visualization    (%s)', visualization_name)
    if trans.debug:
        raise
    return trans.show_error_message(((('There    was    an    error    rendering    the    visualization.    ' + 'Contact    your    Galaxy    administrator    if    the    problem    persists.') + '<br/>Details:    ') + unicodify(exception)), use_panels=False)
