1: <?php
2:
3: /**
4: * Jyxo PHP Library
5: *
6: * LICENSE
7: *
8: * This source file is subject to the new BSD license that is bundled
9: * with this package in the file license.txt.
10: * It is also available through the world-wide-web at this URL:
11: * https://github.com/jyxo/php/blob/master/license.txt
12: */
13:
14: /**
15: * Base exception class used throughout Jyxo libraries.
16: *
17: * @category Jyxo
18: * @package Jyxo_ErrorHandling
19: * @copyright Copyright (c) 2005-2011 Jyxo, s.r.o.
20: * @license https://github.com/jyxo/php/blob/master/license.txt
21: * @author Jaroslav HanslĂk
22: */
23: class Jyxo_Exception extends Exception
24: {
25: /**
26: * Returns all previous exceptions in an array.
27: *
28: * @return array
29: */
30: public function getAllPrevious()
31: {
32: $stack = array();
33: $previous = $this->getPrevious();
34: while (null !== $previous) {
35: $stack[] = $previous;
36: $previous = $previous->getPrevious();
37: }
38: return $stack;
39: }
40: }
41: