From dev-return-38786-archive-asf-public=cust-asf.ponee.io@subversion.apache.org Wed Dec 26 19:50:17 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 15AF1180674 for ; Wed, 26 Dec 2018 19:50:16 +0100 (CET) Received: (qmail 16450 invoked by uid 500); 26 Dec 2018 18:50:16 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Received: (qmail 16429 invoked by uid 99); 26 Dec 2018 18:50:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Dec 2018 18:50:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 07794CDDEE; Wed, 26 Dec 2018 18:50:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.801 X-Spam-Level: X-Spam-Status: No, score=-0.801 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=daniel.shahaf.name header.b=Eqx2zZEe; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=NEvgHFXm Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id qAVtpm8XftQa; Wed, 26 Dec 2018 18:50:13 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id ACC275F574; Wed, 26 Dec 2018 18:50:12 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 0C6B122005; Wed, 26 Dec 2018 13:50:12 -0500 (EST) Received: from web2 ([10.202.2.212]) by compute3.internal (MEProxy); Wed, 26 Dec 2018 13:50:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=message-id:from:to:mime-version :content-transfer-encoding:content-type:references:in-reply-to :date:subject; s=fm2; bh=aJudv3tqII1jBE15m3J39cYrraaeNEF8Ki747Rd E6J0=; b=Eqx2zZEeJdMUs6KPUId7vHVxgOgy8KaRVQVD8uMDv5eTpBZann66vJK tTEOSKgwEInFqsHAecVWuUQmfw/Y7u02Jgclq0b5BCeW7j9MNXEoE0PL79/Pj2iJ p4YH5fVvixEULB57lvIsHDdEntTaXsW8KcpcyfGbahgPe3wviKZeZNYqdA2nTAWJ IdGFgFo9ZzTfp6GWOOn6idlbS5bxYbbva3m4LjQXlAYEX6tPBkcjY0v4vMUMOTX8 CoaD8OJEr7s4+8RzCpJpdKuhCJUhPgXusO8U5FvzEjg1uEj07Olsm0McIUrwBAOe 2k2X8V14R/vmaCdfLLdqNbt7ThNsS5w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=aJudv3tqII1jBE15m3J39cYrraaeNEF8Ki747RdE6 J0=; b=NEvgHFXmU9irdTeu+eK34ElXRPMtkIOmPR8lbww/29I5fN8QS+sk2nFLH DFnHJW2rFD2NDoyL3jI7RrQZdYFBsJNgyJlwVqrh/jMnZsEmAMU49QD4/idNkYG0 SH/kH8+ioPs8tXpeBUbtVHs37a76rDVoioxq21S8otJkWlZeFd9n+QBKU5gMHn5m WFc9MUjRb69Exyty0mF1xH4RoRO1F7RBczt1EXctqO1eHNUmfgDlCkf1Aug16wSG M8xA8PWC0+0TYqOsvdfBy7YK1pR32OwOEpsE+DkLK3k2XgOTA3qsjRcM3A8jhnik 4C3xnUGfJ5IWS/KSagpTBX6INcJxQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrtddtgdelieculddtuddrgedtkedrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthen uceurghilhhouhhtmecufedttdenucenucfjughrpefkhffvggfgtgfofhgjfffusehtje ertdertdejnecuhfhrohhmpeffrghnihgvlhcuufhhrghhrghfuceougdrshesuggrnhhi vghlrdhshhgrhhgrfhdrnhgrmhgvqeenucfrrghrrghmpehmrghilhhfrhhomhepugdrsh esuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgvnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 756726220A; Wed, 26 Dec 2018 13:50:11 -0500 (EST) Message-Id: <1545850211.122295.1618672744.6619B3FD@webmail.messagingengine.com> From: Daniel Shahaf To: dev@subversion.apache.org, commits@subversion.apache.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-2f590f9a References: <20181226042826.25AFD3A0D5B@svn01-us-west.apache.org> In-Reply-To: <20181226042826.25AFD3A0D5B@svn01-us-west.apache.org> Date: Wed, 26 Dec 2018 18:50:11 +0000 Subject: Re: svn commit: r1849737 - in /subversion/trunk/subversion/bindings/cxx: include/svnxx.hpp include/svnxx/exception.hpp src/aprwrap/pool.hpp src/exception.cpp src/private/exception-private.hpp tests/test_exceptions.cpp brane@apache.org wrote on Wed, 26 Dec 2018 04:28 +0000: > Reimplement exceptions in SVN++. > > Instead of extracting error messages from the svn_error_t when the exception > is created, keep the svn_error_t embedded in the exception and use its contents > only when needed. > +++ subversion/trunk/subversion/bindings/cxx/include/svnxx/exception.hpp Wed Dec 26 04:28:25 2018 > @@ -31,6 +31,46 @@ > +/** > + * @defgroup svnxx_exceptions Exceptions > + * > + * Exceptions in SVN++ > + * =================== > + * > + * SVN++ uses exceptions for the following purposes: > + * @li Reporting memory allocation failure; where Subversion's > + * default hehaviour is to abort when an allocation from an APR > + * pool fails, SVN++ throws an exception instead. > + * @li Reporting errors; Subversion's error messages are wrapped in > + * exceptions. > + * @li Reporting cancelled operations; an operation that was > + * cancelled from user code will report this by throwing a > + * specific exception type. > + * @li Terminating iteration; user-level callbacks may throw a > + * specific exception type to cancel an ongoing operation that > + * is generating the callback messages. Other exceptions from > + * user-level callbacks will be propagated back to the calling > + * application. This part is an excellent overview; if it's not already in the C doxygen docs or in HACKING, it should be (mutatis mutandis). > + * Exception Hierarchy > + * ------------------- > + * > + * All SVN++ exceptions are ultimately derived from @c std:::exception. > + * > + * * std::exception > + * + std::runtime_error > + * - apache::subversion::svnxx::allocation_failed\n > + * Thrown when memory cannot be allocated from an APR pool > + * + apache::subversion::svnxx::error\n > + * Thrown when an operation failed (see @ref svn_error_t) > + * - apache::subversion::svnxx::canceled\n > + * Thrown when an operation was canceled > + * + apache::subversion::svnxx::cancel\n > + * Thrown by user callbacks to terminate iteration I think the last two names here are too similar; it'll be way too easy to mis-tab-complete them for each other. Suggest to rename the second one to stop_iteration to match the name of SVN_ERR_STOP_ITERATION. Haven't reviewed the rest of the patch, nor the mapping of svn_error_t::apr_err values to this hierarchy. Cheers, Daniel