Author: Tobias Schlitt Date: 2006-01-12 17:23:22 +0100 (Thu, 12 Jan 2006) New Revision: 1795
Log: - Removed deprecated exception class. - Adding new (missed) exception classes. Added: packages/ImageAnalysis/trunk/src/exceptions/exception.php packages/ImageAnalysis/trunk/src/exceptions/file_not_processable.php packages/ImageAnalysis/trunk/src/exceptions/invalid_handler.php Removed: packages/ImageAnalysis/trunk/src/exceptions/analyzer.php Deleted: packages/ImageAnalysis/trunk/src/exceptions/analyzer.php =================================================================== --- packages/ImageAnalysis/trunk/src/exceptions/analyzer.php 2006-01-12 16:21:57 UTC (rev 1794) +++ packages/ImageAnalysis/trunk/src/exceptions/analyzer.php 2006-01-12 16:23:22 UTC (rev 1795) @@ -1,43 +0,0 @@ -<?php -/** - * File containing the class ezcImageAnalyzerException. - * - * @package ImageAnalysis - * @version //autogentag// - * @copyright Copyright (C) 2005, 2006 eZ systems as. All rights reserved. - * @license http://ez.no/licenses/new_bsd New BSD License - * @filesource - */ - -/** - * Exception to be thrown be ezcImageAnalyzer class. - * - * @see ezcImageAnalyzer - * - * @package ImageAnalysis - */ -class ezcImageAnalyzerException extends Exception -{ - - /** - * The file to analyze does not exist. - */ - const FILE_NOT_EXISTS = 1; - - /** - * The file to analyze could not be read. - */ - const FILE_NOT_READABLE = 2; - - /** - * The image could not be processed. Maybe it's not a valid image file? - */ - const FILE_NOT_PROCESSABLE = 3; - - /** - * An [EMAIL PROTECTED] ezcImageAnalyzerHandler} class, that is registered with the - * [EMAIL PROTECTED] ezcImageAnalyzer} does not exist. - */ - const HANDLER_NOT_EXISTS = 4; -} -?> Added: packages/ImageAnalysis/trunk/src/exceptions/exception.php =================================================================== --- packages/ImageAnalysis/trunk/src/exceptions/exception.php 2006-01-12 16:21:57 UTC (rev 1794) +++ packages/ImageAnalysis/trunk/src/exceptions/exception.php 2006-01-12 16:23:22 UTC (rev 1795) @@ -0,0 +1,20 @@ +<?php +/** + * Base exception for the ImageAnalysis package. + * + * @package ImageAnalysis + * @version //autogen// + * @copyright Copyright (C) 2005, 2006 eZ systems as. All rights reserved. + * @license http://ez.no/licenses/new_bsd New BSD License + */ + +/** + * General exception container for the ImageAnalysis component. + * + * @package ImageAnalysis + * @version //autogen// + */ +abstract class ezcImageAnalyzerException extends ezcBaseException +{ +} +?> Property changes on: packages/ImageAnalysis/trunk/src/exceptions/exception.php ___________________________________________________________________ Name: svn:eol-style + native Added: packages/ImageAnalysis/trunk/src/exceptions/file_not_processable.php =================================================================== --- packages/ImageAnalysis/trunk/src/exceptions/file_not_processable.php 2006-01-12 16:21:57 UTC (rev 1794) +++ packages/ImageAnalysis/trunk/src/exceptions/file_not_processable.php 2006-01-12 16:23:22 UTC (rev 1795) @@ -0,0 +1,25 @@ +<?php +/** + * File containing the ezcImageAnalyzerFileNotProcessableException. + * + * @package ImageAnalysis + * @version //autogen// + * @copyright Copyright (C) 2005, 2006 eZ systems as. All rights reserved. + * @license http://ez.no/licenses/new_bsd New BSD License + */ + +/** + * The option name you tried to register is already in use. + * + * @package ImageAnalysis + * @version //autogen// + */ +class ezcImageAnalyzerFileNotProcessableException extends ezcImageAnalyzerException +{ + function __construct( $file, $reason = 'unknown' ) + { + parent::__construct( "Could not process file <{$file}>. Reason: <{$reason}>" ); + } +} + +?> Property changes on: packages/ImageAnalysis/trunk/src/exceptions/file_not_processable.php ___________________________________________________________________ Name: svn:eol-style + native Added: packages/ImageAnalysis/trunk/src/exceptions/invalid_handler.php =================================================================== --- packages/ImageAnalysis/trunk/src/exceptions/invalid_handler.php 2006-01-12 16:21:57 UTC (rev 1794) +++ packages/ImageAnalysis/trunk/src/exceptions/invalid_handler.php 2006-01-12 16:23:22 UTC (rev 1795) @@ -0,0 +1,25 @@ +<?php +/** + * File containing the ezcImageAnalyzerInvalidHandlerException. + * + * @package ImageAnalysis + * @version //autogen// + * @copyright Copyright (C) 2005, 2006 eZ systems as. All rights reserved. + * @license http://ez.no/licenses/new_bsd New BSD License + */ + +/** + * A registered handler class does not exist or does not inherit from ezcImageAnalyzerHandler. + * + * @package ImageAnalysis + * @version //autogen// + */ +class ezcImageAnalyzerInvalidHandlerException extends ezcImageAnalyzerException +{ + function __construct( $handlerClass ) + { + parent::__construct( "The registered handler class <{$handlerClass}> does not exist or does not inherit from ezcImageAnalyzerHandler." ); + } +} + +?> Property changes on: packages/ImageAnalysis/trunk/src/exceptions/invalid_handler.php ___________________________________________________________________ Name: svn:eol-style + native -- svn-components mailing list [email protected] http://lists.ez.no/mailman/listinfo/svn-components
