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 1QaPks-0004Lx-JD for garchives@archives.gentoo.org; Sat, 25 Jun 2011 10:06:22 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E19871C053; Sat, 25 Jun 2011 10:05:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id B0FE41C053 for ; Sat, 25 Jun 2011 10:05:51 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6F8351BC003 for ; Sat, 25 Jun 2011 10:05:51 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 54BD98003C for ; Sat, 25 Jun 2011 10:05:50 +0000 (UTC) From: "Petteri Räty" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Petteri Räty" Message-ID: <95c82eca762174b0d329af65029fd2e1a280232b.betelgeuse@gentoo> Subject: [gentoo-commits] proj/libbash:master commit in: / X-VCS-Repository: proj/libbash X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: 95c82eca762174b0d329af65029fd2e1a280232b Date: Sat, 25 Jun 2011 10:05:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 63fbb0fc1b39841576bee623c31fa9cf commit: 95c82eca762174b0d329af65029fd2e1a280232b Author: Petteri R=C3=A4ty petteriraty eu> AuthorDate: Sat Jun 25 10:04:08 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Sat Jun 25 10:04:08 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3D95c82eca Merge remote-tracking branch 'mu/break_builtin' Conflicts: src/builtins/builtin_exceptions.h Makefile.am | 3 + bashast/libbashWalker.g | 28 ++++++- scripts/compound_command.bash | 87 ++++++++++++++= ++++++ scripts/compound_command.bash.result | 10 ++- .../{continue_builtin.cpp =3D> break_builtin.cpp} | 16 ++-- src/builtins/{let_builtin.h =3D> break_builtin.h} | 12 ++-- src/builtins/builtin_exceptions.h | 46 +++++++++-- .../tests/{continue_tests.cpp =3D> break_tests.cpp} | 26 +++--- src/cppbash_builtin.cpp | 2 + 9 files changed, 189 insertions(+), 41 deletions(-) diff --cc src/builtins/builtin_exceptions.h index 9b0c1d8,c535417..7b45efc --- a/src/builtins/builtin_exceptions.h +++ b/src/builtins/builtin_exceptions.h @@@ -59,6 -61,36 +61,36 @@@ public } }; =20 + class continue_exception: public loop_control_exception + { + protected: + virtual void rethrow() + { + throw *this; + } +=20 + public: + explicit continue_exception(int c): loop_control_exception(c) { + if(c < 1) - throw libbash::interpreter_exception("continue: argument should b= e greater than or equal to 1"); ++ throw libbash::illegal_argument_exception("continue: argument sho= uld be greater than or equal to 1"); + } + }; +=20 + class break_exception: public loop_control_exception + { + protected: + virtual void rethrow() + { + throw *this; + } +=20 + public: + explicit break_exception(int c): loop_control_exception(c) { + if(c < 1) - throw libbash::interpreter_exception("break: argument should be g= reater than or equal to 1"); ++ throw libbash::illegal_argument_exception("break: argument should= be greater than or equal to 1"); + } + }; +=20 class suppress_output: public std::exception { };