Exemple #1
0
 def send_crash(self, exc):
     if not hasattr(exc, "traceback"):
         traceback.print_exc()
         exc.traceback = traceback.format_exc(exc)
     data = {"message": str(exc), "traceback": exc.traceback, "report": make_report(exc)}
     data = json.dumps(data)
     self.emit("crash", data)
Exemple #2
0
 def send_crash(self, exc):
     if not hasattr(exc, 'traceback'):
         exc.traceback = traceback.format_exc(exc)
     data = {
         'message': str(exc),
         'traceback': exc.traceback,
         'report': make_report()
     }
     data = json.dumps(data)
     self.emit('crash', data)
Exemple #3
0
 def send_crash(self, exc):
     if not hasattr(exc, 'traceback'):
         exc.traceback = traceback.format_exc(exc)
     data = {
         'message': str(exc),
         'traceback': exc.traceback,
         'report': make_report()
     }
     data = json.dumps(data)
     self.emit('crash', data)
Exemple #4
0
def handle_crash(exc):
    logging.error('Fatal crash occured')
    traceback.print_exc()
    exc.traceback = traceback.format_exc(exc)
    report_path = '/root/ajenti-crash.txt'
    try:
        report = open(report_path, 'w')
    except:
        report_path = './ajenti-crash.txt'
        report = open(report_path, 'w')
    report.write(make_report(exc))
    report.close()
    logging.error('Crash report written to %s' % report_path)
    logging.error('Please submit it to https://github.com/Eugeny/ajenti/issues/new')
Exemple #5
0
def handle_crash(exc):
    logging.error("Fatal crash occured")
    traceback.print_exc()
    exc.traceback = traceback.format_exc(exc)
    report_path = "/root/ajenti-crash.txt"
    try:
        report = open(report_path, "w")
    except:
        report_path = "./ajenti-crash.txt"
        report = open(report_path, "w")
    report.write(make_report(exc))
    report.close()
    logging.error("Crash report written to %s" % report_path)
    logging.error("Please submit it to https://github.com/Eugeny/ajenti/issues/new")
Exemple #6
0
def handle_crash(exc):
    logging.error('Fatal crash occured')
    traceback.print_exc()
    exc.traceback = traceback.format_exc(exc)
    report_path = '/root/ajenti-crash.txt'
    try:
        report = open(report_path, 'w')
    except:
        report_path = './ajenti-crash.txt'
        report = open(report_path, 'w')
    report.write(make_report(exc))
    report.close()
    logging.error('Crash report written to %s' % report_path)
    logging.error(
        'Please submit it to https://github.com/ajenti/ajenti/issues/new')