1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-25 16:28:11 +00:00

Add the fault handler in order to try to get a proper crash stack

This commit is contained in:
Julien Duponchelle 2015-05-17 12:45:09 +02:00
parent 221a35baae
commit 0c5b753211
2 changed files with 6 additions and 0 deletions

View File

@ -19,6 +19,10 @@ import os
import sys
import struct
import platform
import faulthandler
# Display a traceback in case of segfault crash. Usefull when frozen
faulthandler.enable()
try:
import raven

View File

@ -190,6 +190,8 @@ def main():
port = int(server_config["port"])
server = Server.instance(host, port)
try:
import faulthandler
faulthandler._sigsegv()
server.run()
except OSError as e:
# This is to ignore OSError: [WinError 0] The operation completed successfully exception on Windows.