Skip to content

Commit 263df26

Browse files
author
arman-bd
committed
debug: add detailed import error traceback to _client_c.py
1 parent 357ba66 commit 263df26

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/httpmorph/_client_c.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
from httpmorph import _httpmorph
1515

1616
HAS_C_EXTENSION = True
17-
except ImportError:
17+
except ImportError as e:
18+
import sys
19+
print(f"WARNING: Failed to import _httpmorph: {e}", file=sys.stderr)
20+
import traceback
21+
traceback.print_exc()
1822
HAS_C_EXTENSION = False
1923
_httpmorph = None
2024

0 commit comments

Comments
 (0)