From 1995b1a06c3842c26ee5b1ebe472793228058ef5 Mon Sep 17 00:00:00 2001 From: Andrey Pavlenko Date: Wed, 8 Aug 2012 16:39:24 +0400 Subject: [PATCH] duplicating cv::error() message to Android logcat --- modules/core/src/system.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp index b8a46611b..42bf6593d 100644 --- a/modules/core/src/system.cpp +++ b/modules/core/src/system.cpp @@ -96,6 +96,10 @@ #endif #endif +#ifdef ANDROID +# include +#endif + namespace cv { @@ -556,6 +560,9 @@ void error( const Exception& exc ) exc.func.c_str() : "unknown function", exc.file.c_str(), exc.line ); fprintf( stderr, "%s\n", buf ); fflush( stderr ); +# ifdef ANDROID + __android_log_print(ANDROID_LOG_ERROR, "cv::error()", "%s", buf); +# endif } if(breakOnError)