'Display the current exception and stack.'

def displayException(self):

    tb = traceback.format_exc()
    lines = []
    indent = 4
    prefix = ''
    for l in tb.split('\n'):
        lines.append(((('    ' * indent) + prefix) + l))
    self.write('\n'.join(lines))
    self.exceptionHandler(*sys.exc_info())
