Skip to content

Commit 3186145

Browse files
authored
added error logging for samples (#47)
* fixed user agent version * updated paths * added error logging for sample generation
1 parent 6fe843a commit 3186145

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

generate_sdk_docs.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,18 @@ class Program
307307
return output
308308

309309
except subprocess.CalledProcessError as e:
310-
print(f"Error executing example for {method_name}: {e}")
310+
# Log detailed error information to the console
311+
print("=" * 80)
312+
print(f"ERROR: Failed to execute example for method '{method_name}'")
313+
print("-" * 80)
314+
print(f"Command: {e.cmd}")
315+
print(f"Return Code: {e.returncode}")
316+
print("Standard Output:")
317+
print(e.stdout or "(No output)")
318+
print("-" * 80)
319+
print("Standard Error:")
320+
print(e.stderr or "(No error details)")
321+
print("=" * 80)
311322
return None
312323

313324
finally:

0 commit comments

Comments
 (0)