Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 57500 invoked from network); 7 Feb 2008 21:25:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Feb 2008 21:25:16 -0000 Received: (qmail 97842 invoked by uid 500); 7 Feb 2008 21:25:08 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 97824 invoked by uid 500); 7 Feb 2008 21:25:08 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 97815 invoked by uid 99); 7 Feb 2008 21:25:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Feb 2008 13:25:08 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Feb 2008 21:25:00 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 187861A9832; Thu, 7 Feb 2008 13:24:53 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@harmony.apache.org From: hindessm@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080207212453.187861A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 */