Skip to content

Improve error handling and debugging#37

Merged
Rasukarusan merged 2 commits into
masterfrom
feature/improve-error-handling
Mar 27, 2026
Merged

Improve error handling and debugging#37
Rasukarusan merged 2 commits into
masterfrom
feature/improve-error-handling

Conversation

@Rasukarusan

Copy link
Copy Markdown
Owner

Summary

  • Add SHELLNIUM_DEBUG=true for verbose request/response logging
  • Add _check_error() to detect and surface WebDriver error messages
  • Improve error handling in core functions with proper exit codes
  • No behavior change when debug mode is off (backward compatible)

Closes #29

Test plan

  • SHELLNIUM_DEBUG=true ./demo.sh shows request/response logs
  • Error messages from WebDriver are surfaced to stderr
  • Normal operation (debug off) is unchanged
  • No performance regression

- Add _shellnium_log() for verbose request/response logging via SHELLNIUM_DEBUG=true
- Add _check_error() to detect and surface WebDriver error responses to stderr
- Replace >/dev/null redirections with _check_error() calls in core functions
- Add proper exit codes to find_element, find_elements, and exec_script
- Document SHELLNIUM_DEBUG in README.md Configuration section

Backward compatible: no behavior change when debug mode is off.
@Rasukarusan Rasukarusan merged commit 4f4bfd9 into master Mar 27, 2026
2 checks passed
@Rasukarusan Rasukarusan deleted the feature/improve-error-handling branch March 27, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve error handling and debugging

1 participant