From 0f966efbb04c5dd49523018ea7005265fb6b2d81 Mon Sep 17 00:00:00 2001 From: 2youyouo2 <501251991@qq.com> Date: Wed, 6 Jul 2016 14:21:49 +0800 Subject: [PATCH] fixed errorHandler --- native/cocos/scripting/js-bindings/manual/ScriptingCore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/cocos/scripting/js-bindings/manual/ScriptingCore.cpp b/native/cocos/scripting/js-bindings/manual/ScriptingCore.cpp index 2afa4ee167..315a5f48b2 100644 --- a/native/cocos/scripting/js-bindings/manual/ScriptingCore.cpp +++ b/native/cocos/scripting/js-bindings/manual/ScriptingCore.cpp @@ -902,7 +902,7 @@ void ScriptingCore::reportError(JSContext *cx, const char *message, JSErrorRepor __android_log_print(ANDROID_LOG_ERROR, "cocos js error:", "%s line:%u msg:%s", fileName.c_str(), report->lineno, msg.c_str()); #else - printf("%s:%u:%s\n", fileName.c_str(), report->lineno, msg.c_str()); + cocos2d::log("%s:%u:%s\n", fileName.c_str(), report->lineno, msg.c_str()); #endif // Should clear pending exception, otherwise it will trigger infinite loop if (JS_IsExceptionPending(cx)) {