Lines Matching refs:group
29 to exceptions handler and group of exceptions (with transactions).
66 thrown exceptions through events and how to use group of exceptions.
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
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();