. */ /** * Exception that is thrown in case the index of an array requested does not exist * * @version 1.0 * @date 10.4.2010 * @author Wim van Ravesteijn * @license http://opensource.org/licenses/gpl-license.php GNU Public License */ class IndexOutOfBoundsException extends Exception { /** * Default constructor */ public function __construct($message = "", $code = 0) { if( $message == "" ) { $message = _("Requested index of array is out of bounds."); } parent::__construct($message, $code); } /** * Return formatted string for display */ public function __toString() { return __CLASS__ . ": [{$this->code}]: {$this->message}\n"; } } ?>