Report unhandled exceptions via log_error() as well
This commit is contained in:
parent
54ed08c24e
commit
a0df5b970b
@ -19,7 +19,7 @@ from .fast_data_types import (
|
|||||||
)
|
)
|
||||||
from .fonts.box_drawing import set_scale
|
from .fonts.box_drawing import set_scale
|
||||||
from .utils import (
|
from .utils import (
|
||||||
detach, end_startup_notification, init_startup_notification,
|
detach, end_startup_notification, init_startup_notification, log_error,
|
||||||
single_instance
|
single_instance
|
||||||
)
|
)
|
||||||
from .window import load_shader_programs
|
from .window import load_shader_programs
|
||||||
@ -93,7 +93,7 @@ def setup_profiling(args):
|
|||||||
print('To view the graphical call data, use: kcachegrind', cg)
|
print('To view the graphical call data, use: kcachegrind', cg)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def _main():
|
||||||
try:
|
try:
|
||||||
sys.setswitchinterval(1000.0) # we have only a single python thread
|
sys.setswitchinterval(1000.0) # we have only a single python thread
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
@ -157,3 +157,13 @@ def main():
|
|||||||
signal.signal(signal.SIGCHLD, signal.SIG_DFL)
|
signal.signal(signal.SIGCHLD, signal.SIG_DFL)
|
||||||
finally:
|
finally:
|
||||||
glfw_terminate()
|
glfw_terminate()
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
try:
|
||||||
|
_main()
|
||||||
|
except Exception:
|
||||||
|
import traceback
|
||||||
|
tb = traceback.format_exc()
|
||||||
|
log_error(tb)
|
||||||
|
raise SystemExit(1)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user