COMPMID-631: Merge branches/gles_compute branch

Last commit:
commit b25c5f68042b0c81bf611d59a1bb8535e1c42497
Author: Xinghang Zhou <xinghang.zhou@arm.com>
Date:   Wed Oct 25 18:48:10 2017 +0800

    Synced validation's tolerances of GCSoftmax from cl side

Change-Id: Ibe72054205c1c8721845d679a31af7ed0a7c5cf6
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/93283
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
diff --git a/src/core/Error.cpp b/src/core/Error.cpp
index 2e699fe..3b0a012 100644
--- a/src/core/Error.cpp
+++ b/src/core/Error.cpp
@@ -30,23 +30,29 @@
 
 using namespace arm_compute;
 
-Error arm_compute::create_error(ErrorCode error_code, const char *function, const char *file, const int line, const char *msg, ...)
+Error arm_compute::create_error_va_list(ErrorCode error_code, const char *function, const char *file, const int line, const char *msg, va_list args)
 {
-    char    out[512];
-    va_list args;
-    va_start(args, msg);
-    int offset = snprintf(out, sizeof(out), "in %s %s:%d: ", function, file, line);
+    char out[512];
+    int  offset = snprintf(out, sizeof(out), "in %s %s:%d: ", function, file, line);
     vsnprintf(out + offset, sizeof(out) - offset, msg, args);
-    va_end(args);
 
     return Error(error_code, std::string(out));
 }
 
+Error arm_compute::create_error(ErrorCode error_code, const char *function, const char *file, const int line, const char *msg, ...)
+{
+    va_list args;
+    va_start(args, msg);
+    auto err = create_error_va_list(error_code, function, file, line, msg, args);
+    va_end(args);
+    return err;
+}
+
 void arm_compute::error(const char *function, const char *file, const int line, const char *msg, ...)
 {
     va_list args;
     va_start(args, msg);
-    auto err = create_error(ErrorCode::RUNTIME_ERROR, function, file, line, msg, args);
+    auto err = create_error_va_list(ErrorCode::RUNTIME_ERROR, function, file, line, msg, args);
     va_end(args);
     throw std::runtime_error(err.description());
 }