From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1NlDD3-0004NJ-JT for garchives@archives.gentoo.org; Sat, 27 Feb 2010 03:19:17 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7E5B6E0A60; Sat, 27 Feb 2010 03:19:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 59C02E0A60 for ; Sat, 27 Feb 2010 03:19:16 +0000 (UTC) Received: from [192.168.22.10] (ip68-4-152-120.oc.oc.cox.net [68.4.152.120]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id DCA621B4064 for ; Sat, 27 Feb 2010 03:19:15 +0000 (UTC) Message-ID: <4B888F89.9040407@gentoo.org> Date: Fri, 26 Feb 2010 19:20:41 -0800 From: Zac Medico User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.7) Gecko/20100215 Thunderbird/3.0.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] Composite exceptions? References: <4B888D77.3030104@gentoo.org> In-Reply-To: <4B888D77.3030104@gentoo.org> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: 423f6313-4603-48ad-840d-15e6a23f0ec2 X-Archives-Hash: 28deb1867ceb107fd97508437c4825eb On 02/26/2010 07:11 PM, Sebastian Pipping wrote: > Hello! > > > I was wondering how to best handle a case with functions that I would > like to collect several exceptions from. Is there an existing standard > way to solve this? > > I was thinking of using the composite pattern for this allowing to throw > "a tree of exceptions" with the option to flatten it for display later. > How far off does that sound to you? Do you have an example case where you want to use this? Is this a common practice? Maybe other approaches are better? -- Thanks, Zac