harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r619644 - /harmony/enhanced/classlib/trunk/modules/archive/src/main/native/archive/shared/zip.h
Date Thu, 07 Feb 2008 21:24:52 GMT
Author: hindessm
Date: Thu Feb  7 13:24:50 2008
New Revision: 619644

URL: http://svn.apache.org/viewvc?rev=619644&view=rev
Log:
Add a macro to assist in providing more appropriate exceptions from
zlib errors.

Modified:
    harmony/enhanced/classlib/trunk/modules/archive/src/main/native/archive/shared/zip.h

Modified: harmony/enhanced/classlib/trunk/modules/archive/src/main/native/archive/shared/zip.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/archive/shared/zip.h?rev=619644&r1=619643&r2=619644&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/archive/src/main/native/archive/shared/zip.h (original)
+++ harmony/enhanced/classlib/trunk/modules/archive/src/main/native/archive/shared/zip.h Thu
Feb  7 13:24:50 2008
@@ -45,4 +45,11 @@
   MUTEX mutex;
 } JCLZipFileLink;
 
+#define THROW_ZIP_EXCEPTION(env, err, type)            \
+  if (err == Z_MEM_ERROR) {                            \
+    throwNewOutOfMemoryError(env, "");                 \
+  } else {                                             \
+    throwNew##type(env, (const char*) zError(err));    \
+  }
+
 #endif /* zip_h */



Mime
View raw message