-
Notifications
You must be signed in to change notification settings - Fork 10
[Query] Find Exceptions of Functions #2157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Query] Find Exceptions of Functions #2157
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds functionality to track and query exceptions thrown by functions in R code. The implementation includes both the core exception tracking logic and a new query API to inspect which functions may throw exceptions.
- Adds a new
inspect-exceptionquery to identify functions that throw exceptions - Improves
tryCatchhandling to properly track exception control flow and error handler behavior - Refactors common query filtering logic into a shared utility function
Reviewed changes
Copilot reviewed 15 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/dataflow/fn/exceptions-of-function.ts |
New module implementing exception tracking by traversing the call graph to find error exit points |
src/dataflow/internal/process/functions/call/built-in/built-in-try-catch.ts |
Enhanced tryCatch processing to track error handlers, control dependencies, and call graph edges |
src/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.ts |
New query format definition with schema, parser, and result formatting for exception inspection |
src/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.ts |
Query executor and shared helper function for filtering functions in the call graph |
src/queries/query.ts |
Registers the new inspect-exception query type |
src/queries/catalog/inspect-recursion-query/inspect-recursion-query-executor.ts |
Refactored to use shared getFunctionsToConsiderInCallGraph helper |
src/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.ts |
Refactored to use shared getFunctionsToConsiderInCallGraph helper |
src/documentation/wiki-query.ts |
Documents the new exception inspection query with examples |
src/documentation/doc-util/doc-query.ts |
Adds comment clarifying wiki generation validation |
test/functionality/dataflow/functions/exceptions-functions.test.ts |
Comprehensive tests for exception tracking through function calls and try-catch blocks |
test/functionality/dataflow/processing-of-elements/exceptions/dataflow-exceptions.test.ts |
Updates tests for improved tryCatch exception handling behavior |
test/functionality/dataflow/call-graph/call-graph.test.ts |
Adds test for finally clause handling in tryCatch call graph |
wiki/Core.md |
Auto-generated documentation updates (timestamps and performance metrics) |
wiki/Capabilities.md |
Auto-generated capability status updates for S3/S4 OOP support |
README.md |
Auto-generated examples with updated performance timings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/dataflow/internal/process/functions/call/built-in/built-in-try-catch.ts
Show resolved
Hide resolved
src/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.ts
Outdated
Show resolved
Hide resolved
|
This pull request is included in v2.8.0 (see Release v2.8.0 (Call-Graphs, Roxygen 2 Support, Many Plugins, Registrations, Exceptions and Hooks)). |
No description provided.