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
c1cfb4d4
Commit
c1cfb4d4
authored
Nov 28, 2013
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: added cv::error with CV_NORETURN attr
parent
daefe698
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
base.hpp
modules/core/include/opencv2/core/base.hpp
+20
-0
cvdef.h
modules/core/include/opencv2/core/cvdef.h
+15
-0
No files found.
modules/core/include/opencv2/core/base.hpp
View file @
c1cfb4d4
...
@@ -222,6 +222,23 @@ enum {
...
@@ -222,6 +222,23 @@ enum {
*/
*/
CV_EXPORTS
void
error
(
int
_code
,
const
String
&
_err
,
const
char
*
_func
,
const
char
*
_file
,
int
_line
);
CV_EXPORTS
void
error
(
int
_code
,
const
String
&
_err
,
const
char
*
_func
,
const
char
*
_file
,
int
_line
);
#ifdef __GNUC__
# if defined __clang__ || defined __APPLE__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Winvalid-noreturn"
# endif
#endif
CV_INLINE
CV_NORETURN
void
errorNoReturn
(
int
_code
,
const
String
&
_err
,
const
char
*
_func
,
const
char
*
_file
,
int
_line
)
{
error
(
_code
,
_err
,
_func
,
_file
,
_line
);
}
#ifdef __GNUC__
# if defined __clang__ || defined __APPLE__
# pragma GCC diagnostic pop
# endif
#endif
#if defined __GNUC__
#if defined __GNUC__
#define CV_Func __func__
#define CV_Func __func__
#elif defined _MSC_VER
#elif defined _MSC_VER
...
@@ -234,6 +251,9 @@ CV_EXPORTS void error(int _code, const String& _err, const char* _func, const ch
...
@@ -234,6 +251,9 @@ CV_EXPORTS void error(int _code, const String& _err, const char* _func, const ch
#define CV_Error_( code, args ) cv::error( code, cv::format args, CV_Func, __FILE__, __LINE__ )
#define CV_Error_( code, args ) cv::error( code, cv::format args, CV_Func, __FILE__, __LINE__ )
#define CV_Assert( expr ) if(!!(expr)) ; else cv::error( cv::Error::StsAssert, #expr, CV_Func, __FILE__, __LINE__ )
#define CV_Assert( expr ) if(!!(expr)) ; else cv::error( cv::Error::StsAssert, #expr, CV_Func, __FILE__, __LINE__ )
#define CV_ErrorNoReturn( code, msg ) cv::errorNoReturn( code, msg, CV_Func, __FILE__, __LINE__ )
#define CV_ErrorNoReturn_( code, args ) cv::errorNoReturn( code, cv::format args, CV_Func, __FILE__, __LINE__ )
#ifdef _DEBUG
#ifdef _DEBUG
# define CV_DbgAssert(expr) CV_Assert(expr)
# define CV_DbgAssert(expr) CV_Assert(expr)
#else
#else
...
...
modules/core/include/opencv2/core/cvdef.h
View file @
c1cfb4d4
...
@@ -464,4 +464,19 @@ CV_INLINE int cvIsInf( double value )
...
@@ -464,4 +464,19 @@ CV_INLINE int cvIsInf( double value )
CV_INLINE
CV_XADD
(
int
*
addr
,
int
delta
)
{
int
tmp
=
*
addr
;
*
addr
+=
delta
;
return
tmp
;
}
CV_INLINE
CV_XADD
(
int
*
addr
,
int
delta
)
{
int
tmp
=
*
addr
;
*
addr
+=
delta
;
return
tmp
;
}
#endif
#endif
/****************************************************************************************\
* CV_NORETURN attribute *
\****************************************************************************************/
#ifndef CV_NORETURN
# if defined(__GNUC__)
# define CV_NORETURN __attribute__((__noreturn__))
# elif defined(_MSC_VER) && (_MSC_VER >= 1300)
# define CV_NORETURN __declspec(noreturn)
# else
# define CV_NORETURN
/* nothing by default */
# endif
#endif
#endif // __OPENCV_CORE_CVDEF_H__
#endif // __OPENCV_CORE_CVDEF_H__
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