Skip to content

Commit 26011b4

Browse files
committed
feat: print error traceback
1 parent 7bb184f commit 26011b4

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

demo/ssd_import_demo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from easyssp_utils.client import ApiException
44
from pydantic import ValidationError
55
from demo_config import USER_AGENT, EASYSSP_USERNAME, EASYSSP_PASSWORD
6+
import traceback
67

78
with (open("../input/ssd_example.ssd", "rb") as ssd_input_file):
89
try:
@@ -15,4 +16,4 @@
1516
# catch ValidationError for incorrect request parameters
1617
# catch ApiException for errors from the API client or the server
1718
except (AuthError, ApiException, ValidationError) as ex:
18-
print(ex)
19+
traceback.print_exc()

demo/ssp_export_demo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from easyssp_utils.client import ApiException
44
from pydantic import ValidationError
55
from demo_config import USER_AGENT, EASYSSP_USERNAME, EASYSSP_PASSWORD
6+
import traceback
67

78
with (open("../output/ssp_output.ssp", "wb") as ssp_output_file):
89
try:
@@ -18,4 +19,4 @@
1819
# catch ValidationError for incorrect request parameters
1920
# catch ApiException for errors from the API client or the server
2021
except (AuthError, ApiException, ValidationError) as ex:
21-
print(ex)
22+
traceback.print_exc()

demo/ssp_import_demo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from easyssp_utils.client import ApiException
44
from pydantic import ValidationError
55
from demo_config import USER_AGENT, EASYSSP_USERNAME, EASYSSP_PASSWORD
6+
import traceback
67

78
with (open("../input/ssp_example.ssp", "rb") as ssp_input_file):
89
try:
@@ -16,4 +17,4 @@
1617
# catch ValidationError for incorrect request parameters
1718
# catch ApiException for errors from the API client or the server
1819
except (AuthError, ApiException, ValidationError) as ex:
19-
print(ex)
20+
traceback.print_exc()

0 commit comments

Comments
 (0)