mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
core: drop cv::errorNoReturn()
replaced to cv::error()
This commit is contained in:
@@ -970,6 +970,13 @@ static void cv_terminate_handler() {
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
# if defined __clang__ || defined __APPLE__
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Winvalid-noreturn"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
void error( const Exception& exc )
|
||||
{
|
||||
#ifdef CV_ERROR_SET_TERMINATE_HANDLER
|
||||
@@ -1000,13 +1007,33 @@ void error( const Exception& exc )
|
||||
}
|
||||
|
||||
CV_THROW(exc);
|
||||
#ifdef __GNUC__
|
||||
# if !defined __clang__ && !defined __APPLE__
|
||||
// this suppresses this warning: "noreturn" function does return [enabled by default]
|
||||
__builtin_trap();
|
||||
// or use infinite loop: for (;;) {}
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void error(int _code, const String& _err, const char* _func, const char* _file, int _line)
|
||||
{
|
||||
error(cv::Exception(_code, _err, _func, _file, _line));
|
||||
#ifdef __GNUC__
|
||||
# if !defined __clang__ && !defined __APPLE__
|
||||
// this suppresses this warning: "noreturn" function does return [enabled by default]
|
||||
__builtin_trap();
|
||||
// or use infinite loop: for (;;) {}
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
# if defined __clang__ || defined __APPLE__
|
||||
# pragma GCC diagnostic pop
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
ErrorCallback
|
||||
redirectError( ErrorCallback errCallback, void* userdata, void** prevUserdata)
|
||||
|
||||
Reference in New Issue
Block a user