test failing on my win3k due to log record ~100k. will fix later
This commit is contained in:
parent
bcd097bb16
commit
5e4d3e4475
@ -190,7 +190,14 @@ JNIEXPORT jobject SIGAR_JNI(win32_EventLog_read)
|
||||
char buf[MAX_ERROR_LENGTH];
|
||||
DWORD lastError = GetLastError();
|
||||
|
||||
sprintf(buf, "Error reading from the event log: %d", lastError);
|
||||
if (lastError == ERROR_INSUFFICIENT_BUFFER) {
|
||||
/* XXX need to handle this */
|
||||
sprintf(buf, "Buffer size (%d) too small (%d needed)",
|
||||
sizeof(buffer), dwNeeded);
|
||||
}
|
||||
else {
|
||||
sprintf(buf, "Error reading from the event log: %d", lastError);
|
||||
}
|
||||
win32_throw_exception(env, buf);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user