Skip to content
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

Error handling in passes #142

Merged
merged 2 commits into from
Nov 18, 2024
Merged

Error handling in passes #142

merged 2 commits into from
Nov 18, 2024

Conversation

pandurangpatil
Copy link
Member

No description provided.

)
try {
cpg.method.whereNot(_.astParent).foreach { method =>
addAstParent(method, method.fullName, method.astParentType, method.astParentFullName, dstGraph)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also add handling in functions like addAstParent

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

)
try {
// Create SOURCE_FILE edges from nodes of various types to FILE
linkToSingle(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also add handling for method linkToSingle

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@khemrajrathore
Copy link
Member

@pandurangpatil

  • Newly added logs like logger.warn(s"Error in TypeHierarchyPass", ex) should be error logs
  • Ideally the methods like linkToSingle or addAstParent, should also have handling, as with the current approach completeness cannot be gauranteed

Haven't reviewed for completeness of the changes, as that will take more time to review. Have reviewed for correctness

@pandurangpatil
Copy link
Member Author

@pandurangpatil

  • Newly added logs like logger.warn(s"Error in TypeHierarchyPass", ex) should be error logs
  • Ideally the methods like linkToSingle or addAstParent, should also have handling, as with the current approach completeness cannot be gauranteed

Haven't reviewed for completeness of the changes, as that will take more time to review. Have reviewed for correctness

I have made them warning to make sure it doesn't get bloated on the console. However, it will get logged into debug file.

@pandurangpatil
Copy link
Member Author

@khemrajrathore for completeness. If there is any critical error being thrown in between. I am sure it will fail the scan in finding dataflow or somewhere else. Which will make sure to log the errors in warning as well as that will indirectly mean the respective scan failure will require proper fix for the failures in overlay passes.

Copy link
Member

@khemrajrathore khemrajrathore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pandurangpatil pandurangpatil merged commit 9746a9a into master Nov 18, 2024
15 of 16 checks passed
@pandurangpatil pandurangpatil deleted the error-logging branch November 18, 2024 13:23
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.

2 participants