cvs: pear /Games_Chess Chess.php

From: Date: Wed, 04 Oct 2006 19:40:44 +0000
Subject: cvs: pear /Games_Chess Chess.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-42414@lists.php.net to get a copy of this message
cellog Wed Oct 4 19:40:44 2006 UTC Modified files: /pear/Games_Chess Chess.php Log: fix potential errant PEAR_Errors propagating up to PEAR_Error callbacks discovered by new .phpt tests http://cvs.php.net/viewvc.cgi/pear/Games_Chess/Chess.php?r1=1.17&r2=1.18&diff_format=u Index: pear/Games_Chess/Chess.php diff -u pear/Games_Chess/Chess.php:1.17 pear/Games_Chess/Chess.php:1.18 --- pear/Games_Chess/Chess.php:1.17 Wed Oct 4 19:01:27 2006 +++ pear/Games_Chess/Chess.php Wed Oct 4 19:40:44 2006 @@ -16,7 +16,7 @@ // | Authors: Gregory Beaver <cellog@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Chess.php,v 1.17 2006/10/04 19:01:27 cellog Exp $ +// $Id: Chess.php,v 1.18 2006/10/04 19:40:44 cellog Exp $ /** * The Games_Chess Package * @@ -1027,7 +1027,9 @@ case "B" : case "N" : case "P" : + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); $err = $this->addPiece('W', $c, $loc); + PEAR::popErrorHandling(); if ($this->isError($err)) { if ($err->getCode() == GAMES_CHESS_ERROR_MULTIPIECE) { return $this->raiseError(GAMES_CHESS_ERROR_FEN_MULTIPIECE, @@ -1043,7 +1045,9 @@ case "b" : case "n" : case "p" : + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); $err = $this->addPiece('B', strtoupper($c), $loc); + PEAR::popErrorHandling(); if ($this->isError($err)) { if ($err->getCode() == GAMES_CHESS_ERROR_MULTIPIECE) { return $this->raiseError(GAMES_CHESS_ERROR_FEN_MULTIPIECE,

« previous php.pear.cvs (#42414) next »