Add error check for float parsing and fix tests

Change-Id: Ia4f4863d415536b3796edbcdb83c951b6cff02cf
diff --git a/core/jni/android_util_PathParser.cpp b/core/jni/android_util_PathParser.cpp
index bf6ffc54..245aa0f 100644
--- a/core/jni/android_util_PathParser.cpp
+++ b/core/jni/android_util_PathParser.cpp
@@ -19,6 +19,7 @@
 #include <PathParser.h>
 #include <SkPath.h>
 
+#include <android/log.h>
 #include "core_jni_helpers.h"
 
 namespace android {
@@ -27,10 +28,14 @@
         jint strLength) {
     const char* pathString = env->GetStringUTFChars(inputPathStr, NULL);
     SkPath* skPath = reinterpret_cast<SkPath*>(skPathHandle);
-    bool hasValidData = android::uirenderer::PathParser::parseStringForSkPath(skPath, pathString,
-            strLength);
+
+    android::uirenderer::PathParser::ParseResult result;
+    android::uirenderer::PathParser::parseStringForSkPath(skPath, &result, pathString, strLength);
     env->ReleaseStringUTFChars(inputPathStr, pathString);
-    return hasValidData;
+    if (result.failureOccurred) {
+        ALOGE(result.failureMessage.c_str());
+    }
+    return !result.failureOccurred;
 }
 
 static const JNINativeMethod gMethods[] = {