Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8CCC6D66E for ; Sun, 4 Nov 2012 20:53:08 +0000 (UTC) Received: (qmail 30557 invoked by uid 500); 4 Nov 2012 20:53:06 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 30504 invoked by uid 500); 4 Nov 2012 20:53:06 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 30494 invoked by uid 99); 4 Nov 2012 20:53:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Nov 2012 20:53:06 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dawid.weiss@gmail.com designates 209.85.160.48 as permitted sender) Received: from [209.85.160.48] (HELO mail-pb0-f48.google.com) (209.85.160.48) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Nov 2012 20:52:58 +0000 Received: by mail-pb0-f48.google.com with SMTP id wy7so3595255pbc.35 for ; Sun, 04 Nov 2012 12:52:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=e0OsUstgESyqeZplunsfdkAv5H7H/n4CdaG5Zq2CRvI=; b=rBu/tjAqoK8pDbABbQOF8V1iyHklt0LCi668zHVK8HfB6GBxY/ZHA4WKxAAgVkxuia NoekSrEw7OfdsWkbuixsdx1MArBp0ToB5G1gfIrxcXB+g0tjJ8dAMzps6F1yuB+58UfC WHQ/GgBF5Q6y8oaIAohHrXJikGoHpZGEBkpZ68/aPl5bBn5FAfeLWyA8cNEffmf5bkPV sfuDZj9WqmigUOgCsf7Vjz/mBmsWi0bCwMC9kl2YqYwoFylPX0dIklUGZjqsD7BRPqAs 4LIDQr6O0MJJ6TzBg0hwCdymmRgFVCke3G88dP9yiUEw0gT68GDGyyjeCn40i3S7/0Un lF7w== Received: by 10.68.235.71 with SMTP id uk7mr24980547pbc.10.1352062357441; Sun, 04 Nov 2012 12:52:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.66.218.102 with HTTP; Sun, 4 Nov 2012 12:52:17 -0800 (PST) In-Reply-To: <5096D420.2040507@gmx.net> References: <20121102132000.167030@gmx.net> <5096A511.9020809@gmx.net> <5096D420.2040507@gmx.net> From: Dawid Weiss Date: Sun, 4 Nov 2012 21:52:17 +0100 Message-ID: Subject: Re: Excessive use of IOException without proper documentation To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=047d7b33d1a6878b8f04cdb18c6d X-Virus-Checked: Checked by ClamAV on apache.org --047d7b33d1a6878b8f04cdb18c6d Content-Type: text/plain; charset=UTF-8 > There is a tremendous difference. I have possibility at compile time to detect whether an IOE came from Lucene or some other IO related action. I agree with Shai -- there are just as many (or more) reasons not to create custom exception classes and just reuse existing classes with known semantics or propagate the original exception without wrapping it. If you need to know exactly what caused the error then it's really your use case and you'll have to live with bloated code. For most people IOException is sufficient -- something related to I/O went wrong, that's it. These are basically different extreme viewpoints of looking at the same code, there is no right or wrong (regardless of the excellent references you provide). Dawid --047d7b33d1a6878b8f04cdb18c6d--