Fix Javascript evaluation for $run and remove the global error handler. by HikariNee · Pull Request #885 · allthingslinux/tux
Introduce new exceptions for code execution errors, including MissingCodeError, InvalidCodeFormatError, UnsupportedLanguageError, and CompilationError. These exceptions provide specific feedback to users and are integrated into the error handling configuration to log and optionally send certain errors to Sentry for monitoring. Enhancing error handling for code execution improves user experience by providing clear feedback on what went wrong and allows for better monitoring of issues related to code execution, aiding in debugging and improving system reliability.
… and documentation Add comprehensive docstrings to functions and classes for better understanding and maintainability. Introduce custom exceptions for specific error scenarios like missing code, invalid format, unsupported language, and compilation errors. Refactor code to improve readability and maintainability by using helper functions and constants. Enhance user feedback with detailed error messages and usage instructions. These changes improve the robustness and user experience of the code execution cog by providing clear error messages and documentation, making it easier for users to understand how to use the feature and for developers to maintain and extend the code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters