From c42c3ebc9cca21fa2f4c9143c424cffaea0e8967 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 fc4dceda6..759e475d0 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 { @@ -554,6 +558,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)