SDK: update find_java lib
Change-Id: I6a139630a325f3537961cc5be2726816a060bb65
diff --git a/find_java/utils.h b/find_java/utils.h
index a2260b6..dc9031d 100755
--- a/find_java/utils.h
+++ b/find_java/utils.h
@@ -201,7 +201,8 @@
}
// Sets the string to the message matching Win32 GetLastError.
- CString& setLastWin32Error() {
+ // If message is non-null, it is prepended to the last error string.
+ CString& setLastWin32Error(const char *message) {
DWORD err = GetLastError();
LPSTR errStr;
if (FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | /* dwFlags */
@@ -212,7 +213,11 @@
(LPSTR)&errStr, /* lpBuffer */
0, /* nSize */
NULL) != 0) { /* va_list args */
- setf("[%d] %s", err, errStr);
+ if (message == NULL) {
+ setf("[%d] %s", err, errStr);
+ } else {
+ setf("%s[%d] %s", message, err, errStr);
+ }
LocalFree(errStr);
}
return *this;