mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
exceptions: catch format_exc() exception
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
+6
-1
@@ -4,5 +4,10 @@ import traceback
|
||||
class DvcException(Exception):
|
||||
def __init__(self, msg, cause=None):
|
||||
self.cause = cause
|
||||
self.cause_tb = traceback.format_exc() if cause else None
|
||||
self.case_tb = None
|
||||
if cause:
|
||||
try:
|
||||
self.cause_tb = traceback.format_exc()
|
||||
except Exception:
|
||||
pass
|
||||
super(DvcException, self).__init__(msg)
|
||||
|
||||
Reference in New Issue
Block a user