[vmkit-commits] [vmkit] r71940 - /vmkit/trunk/lib/JnJVM/Compiler/JavaAOTCompiler.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Sat May 16 04:50:47 PDT 2009
Author: geoffray
Date: Sat May 16 06:50:44 2009
New Revision: 71940
URL: http://llvm.org/viewvc/llvm-project?rev=71940&view=rev
Log:
Don't throw an unknown exception, just return.
Modified:
vmkit/trunk/lib/JnJVM/Compiler/JavaAOTCompiler.cpp
Modified: vmkit/trunk/lib/JnJVM/Compiler/JavaAOTCompiler.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Compiler/JavaAOTCompiler.cpp?rev=71940&r1=71939&r2=71940&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/Compiler/JavaAOTCompiler.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Compiler/JavaAOTCompiler.cpp Sat May 16 06:50:44 2009
@@ -1572,7 +1572,10 @@
std::vector<Class*> classes;
ArrayUInt8* bytes = Reader::openFile(bootstrapLoader, name);
- if (!bytes) vm->unknownError("Can't find zip file.");
+ if (!bytes) {
+ fprintf(stderr, "Can't find zip file.");
+ goto end;
+ }
ZipArchive archive(bytes, bootstrapLoader->allocator);
char* realName = (char*)alloca(4096);
@@ -1586,9 +1589,11 @@
ArrayUInt8* res =
(ArrayUInt8*)array->doNew(file->ucsize, bootstrapLoader->allocator);
int ok = archive.readFile(res, file);
- if (!ok) vm->unknownError("Wrong zip file.");
+ if (!ok) {
+ fprintf(stderr, "Wrong zip file.");
+ goto end;
+ }
-
memcpy(realName, file->filename, size);
realName[size - 6] = 0;
const UTF8* utf8 = bootstrapLoader->asciizConstructUTF8(realName);
@@ -1677,6 +1682,7 @@
fprintf(stderr, "Error : %s\n", str.c_str());
}
+end:
vm->threadSystem.nonDaemonLock.lock();
--(vm->threadSystem.nonDaemonThreads);
More information about the vmkit-commits
mailing list