Adding better error handling

This commit is contained in:
José Manuel Barroso Galindo
2022-08-19 21:42:42 +02:00
committed by GitHub
parent 18030e7fec
commit a01911ff35

View File

@@ -13,6 +13,7 @@ import os
import tempfile
import xml.etree.ElementTree as ET
import xml.etree.ElementTree
import traceback
from zipfile import ZipFile
from inspect import currentframe, getframeinfo
from typing import Dict, List, Any
@@ -869,4 +870,9 @@ def read_mra_fields(mra_path):
if __name__ == '__main__':
dryrun = len(sys.argv) == 2 and sys.argv[1] == '-d'
main(dryrun)
try:
main(dryrun)
except Exception as e:
print(str(e))
print(traceback.format_exc())
exit(1)