Print CL status code on error in opengl interop functions#22855
Merged
asmorkalov merged 3 commits intoopencv:4.xfrom Nov 25, 2022
Merged
Print CL status code on error in opengl interop functions#22855asmorkalov merged 3 commits intoopencv:4.xfrom
asmorkalov merged 3 commits intoopencv:4.xfrom
Conversation
asmorkalov
reviewed
Nov 24, 2022
Contributor
asmorkalov
left a comment
There was a problem hiding this comment.
I recommend you to use CV_Error_. It supports formatting strings like printf. See https://docs.opencv.org/4.x/db/de0/group__core__utils.html#ga1c0cd6e5bd9a5f915c6cab9c0632f969
Contributor
Author
|
Alright |
Contributor
Author
|
Done 39c9027 |
asmorkalov
approved these changes
Nov 24, 2022
alalek
reviewed
Nov 25, 2022
| cl_int status = clGetPlatformIDs(0, NULL, &numPlatforms); | ||
| if (status != CL_SUCCESS) | ||
| CV_Error(cv::Error::OpenCLInitError, "OpenCL: Can't get number of platforms"); | ||
| CV_Error_(cv::Error::OpenCLInitError, "OpenCL: Can't get number of platforms: %d ", status); |
Member
There was a problem hiding this comment.
Is it tested anywhere on CI?
Used syntax is following:
CV_Error_(code, (format, args...))
Contributor
There was a problem hiding this comment.
I got your point and fix it asap.
Contributor
Author
There was a problem hiding this comment.
I am testing at the moment. Why did this work?
Contributor
Author
There was a problem hiding this comment.
A merge gone bad🤦♂️
Still testing.
Contributor
Author
|
Fixed: kallaballa@8a36966 |
6 tasks
Merged
a-sajjad72
pushed a commit
to a-sajjad72/opencv
that referenced
this pull request
Mar 30, 2023
Print CL status code on error in opengl interop functions
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pertaining Issue: #22854
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.