1
0
mirror of https://github.com/konpa/devicon.git synced 2025-08-22 22:24:43 +02:00

Add fix for bad zip file and logging for build (#1069)

This commit is contained in:
Thomas Bui
2022-03-20 10:04:09 -07:00
committed by GitHub
parent ac68b12d20
commit 39dfa5416e
9 changed files with 154 additions and 96 deletions

View File

@@ -4,13 +4,17 @@ from typing import List
import platform
import sys
import traceback
from io import FileIO
def exit_with_err(err: Exception):
def exit_with_err(err: Exception, logfile: FileIO=None):
"""
Exit the current step and display the err.
:param: err, the error/exception encountered.
"""
traceback.print_exc()
if logfile:
traceback.print_exc(file=logfile)
else:
traceback.print_exc()
sys.exit(1)