Skip to content

Commit a2053b9

Browse files
committed
enh: print UTC time in error messages to make debugging easier
1 parent 221c2c8 commit a2053b9

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

CHANGELOG

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
1.1.3
2+
- enh: print UTC time in error messages to make debugging easier
13
1.1.2
24
- fix: archiving to BagIt format circle selection did not include all circles
35
1.1.1
@@ -574,7 +576,7 @@
574576
- fix: start even if DCOR is down
575577
- fix: do not display mean upload rate during upload
576578
- fix: require restart when server is changed
577-
- enh: ask user to create a Circle when the user is not member of any
579+
- enh: ask user to create a Circle when the user is not member of any
578580
- enh: add basic wizard functionalities
579581
- enh: resource upload supports supplementary resource schemas
580582
- enh: stick to package_revise when finalizing dataset

dcoraid/gui/main.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import atexit
2+
import datetime
23
import threading
34
import traceback
45
from contextlib import ExitStack
@@ -407,7 +408,10 @@ def excepthook(etype, value, trace):
407408
prints the standard Python header: ``Traceback (most recent
408409
call last)``.
409410
"""
410-
vinfo = f"Unhandled exception in DCOR-Aid version {__version__}:\n"
411+
iso_utc_time = datetime.datetime.isoformat(
412+
datetime.datetime.fromtimestamp(time.time(), datetime.UTC))
413+
vinfo = (f"Unhandled exception in DCOR-Aid version {__version__} "
414+
f"at {iso_utc_time}:\n")
411415
exc_long = "".join([vinfo] + tb.format_exception(etype, value, trace))
412416
exc_short = "".join([vinfo] + tb.format_exception(
413417
etype, value, trace, limit=3))

0 commit comments

Comments
 (0)