-
Notifications
You must be signed in to change notification settings - Fork 82
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
[Coverity] Wrap main() with try-catch block (#1839950) #2914
Conversation
f2b6c15
to
8eb53c4
Compare
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.
Do we really have to wrap the main with try and catch?
Anyway.. do you need nested try here?
is generally better than
|
The Coverity issue didn't specify the line where the unhandled exception (std::bad_array_new exception) could possibly be thrown, so I covered the whole the main function with a try-catch block. |
Catch a `std::bad_array_new_length` that can be risen when array indexing Signed-off-by: Daekyoung Jung <[email protected]>
8eb53c4
to
32bdc74
Compare
Now I fixed it. I missed the exception-throwing line that the issue had reported. |
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.
LGTM!
To address coverity issue #1839950, the main function is wrapped with try-catch block.
Self evaluation: