Lines Matching +full:- +full:- +full:group
2 <img src="https://static.hoa-project.net/Image/Hoa.svg" alt="Hoa" width="250px" />
5 ---
8 …<a href="https://travis-ci.org/hoaproject/exception"><img src="https://img.shields.io/travis/hoapr…
11 …<a href="https://hoa-project.net/LICENSE"><img src="https://img.shields.io/packagist/l/hoa/excepti…
21 [](https://webchat.freeno…
22 [](https://gitter.im/hoaproje…
23 …umentation](https://img.shields.io/badge/documentation-hack_book-ff0066.svg)](https://central.hoa-…
24 [](https://waffle.io/hoaproject…
29 to exceptions handler and group of exceptions (with transactions).
31 [Learn more](https://central.hoa-project.net/Documentation/Library/Exception).
44 page](https://hoa-project.net/Source.html).
61 guide](https://hoa-project.net/Literature/Contributor/Guide.html).
66 thrown exceptions through events and how to use group of exceptions.
96 echo $exception->raise(true);
115 library](http://central.hoa-project.net/Resource/Library/Event)). Consequently,
119 Hoa\Event\Event::getEvent('hoa://Event/Exception')->attach(
121 $exception = $bucket->getData();
129 ### Group and transactions
131 Groups of exceptions are represented by the `Hoa\Exception\Group`. A group is an
133 to add more exceptions in the group with the following methods:
142 For instance, if an exceptional behavior is due to several reasons, a group of
143 exceptions can be thrown instead of one exception. Group can be nested too,
147 // A group of exceptions.
148 $group = new Hoa\Exception\Group('Failed because of several reasons.');
149 $group['first'] = new Hoa\Exception\Exception('First reason');
150 $group['second'] = new Hoa\Exception\Exception('Second reason');
152 // Can nest another group.
153 $group['third'] = new Hoa\Exception\Group('Third reason');
154 $group['third']['fourth'] = new Hoa\Exception\Exception('Fourth reason');
156 echo $group->raise(true);
181 The following example uses a transaction to add new exceptions in the group:
184 $group = new Hoa\Exception\Group('Failed because of several reasons.');
185 $group[] = new Hoa\Exception\Exception('Always present.');
187 $group->beginTransaction();
189 $group[] = new Hoa\Exception\Exception('Might be present.');
192 $group->commitTransaction();
194 $group->rollbackTransaction();
201 [hack book of `Hoa\Exception`](https://central.hoa-project.net/Documentation/Library/Exception)
207 $ composer require --dev hoa/devtools
208 $ vendor/bin/hoa devtools:documentation --open
212 [hoa-project.net](https://hoa-project.net/).
220 * On the forum at [users.hoa-project.net](https://users.hoa-project.net).
225 guide](https://hoa-project.net/Literature/Contributor/Guide.html) explains
230 Hoa is under the New BSD License (BSD-3-Clause). Please, see
231 [`LICENSE`](https://hoa-project.net/LICENSE) for details.