Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
bbfa2390
Commit
bbfa2390
authored
7 years ago
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10706 from alalek:exception_opencv_version
parents
c96630c9
f6fd3abd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
system.cpp
modules/core/src/system.cpp
+4
-3
No files found.
modules/core/src/system.cpp
View file @
bbfa2390
...
...
@@ -249,9 +249,9 @@ const char* Exception::what() const throw() { return msg.c_str(); }
void
Exception
::
formatMessage
()
{
if
(
func
.
size
()
>
0
)
msg
=
format
(
"
%s:%d: error: (%d) %s in function %s
\n
"
,
file
.
c_str
(),
line
,
code
,
err
.
c_str
(),
func
.
c_str
());
msg
=
format
(
"
OpenCV(%s) %s:%d: error: (%d) %s in function %s
\n
"
,
CV_VERSION
,
file
.
c_str
(),
line
,
code
,
err
.
c_str
(),
func
.
c_str
());
else
msg
=
format
(
"
%s:%d: error: (%d) %s
\n
"
,
file
.
c_str
(),
line
,
code
,
err
.
c_str
());
msg
=
format
(
"
OpenCV(%s) %s:%d: error: (%d) %s
\n
"
,
CV_VERSION
,
file
.
c_str
(),
line
,
code
,
err
.
c_str
());
}
static
const
char
*
g_hwFeatureNames
[
CV_HARDWARE_MAX_FEATURE
]
=
{
NULL
};
...
...
@@ -957,7 +957,8 @@ void error( const Exception& exc )
char
buf
[
1
<<
12
];
cv_snprintf
(
buf
,
sizeof
(
buf
),
"OpenCV Error: %s (%s) in %s, file %s, line %d"
,
"OpenCV(%s) Error: %s (%s) in %s, file %s, line %d"
,
CV_VERSION
,
errorStr
,
exc
.
err
.
c_str
(),
exc
.
func
.
size
()
>
0
?
exc
.
func
.
c_str
()
:
"unknown function"
,
exc
.
file
.
c_str
(),
exc
.
line
);
fprintf
(
stderr
,
"%s
\n
"
,
buf
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment