Changeset 887
- Timestamp:
- 08/31/07 18:14:07 (1 year ago)
- Files:
-
- trunk/src/main/php/net/stubbles/events/stubLazyEventListener.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/ipo/request/stubAbstractRequest.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/lang/exceptions/stubException.php (modified) (3 diffs)
- trunk/src/main/php/net/stubbles/lang/exceptions/stubRuntimeException.php (added)
- trunk/src/main/php/net/stubbles/lang/exceptions/stubThrowable.php (added)
- trunk/src/main/php/net/stubbles/rdbms/pdo/stubDatabasePDOConnection.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/stubClassLoader.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/util/ext/stubXPClassLoader.php (modified) (3 diffs)
- trunk/src/main/php/net/stubbles/util/log/stubLogDataFactory.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/util/xjconf/stubXJConfClassLoader.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisConfig.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisIncludeTemplatePageElement.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/websites/stubFrontController.php (modified) (3 diffs)
- trunk/src/main/php/net/stubbles/websites/xml/stubXMLPostInterceptor.php (modified) (4 diffs)
- trunk/src/main/php/net/stubbles/xml/xsl/stubXSLCallback.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/xml/xsl/stubXSLProcessor.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/events/stubLazyEventListenerTestCase.php (modified) (2 diffs)
- trunk/src/test/php/net/stubbles/util/log/stubLogDataFactoryTestCase.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/websites/xml/stubXMLPostInterceptorTestCase.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/events/stubLazyEventListener.php
r768 r887 59 59 * 60 60 * @return stubEventListener 61 * @throws stubException62 61 */ 63 62 protected function createInstance() … … 74 73 75 74 if (($instance instanceof stubEventListener) == false) { 76 throw new stub Exception('Lazy loaded event listener ' . $this->fqClassName . ' is not an instance of ' . $this->getPackageName() . '.stubEventListener.');75 throw new stubRuntimeException('Lazy loaded event listener ' . $this->fqClassName . ' is not an instance of ' . $this->getPackageName() . '.stubEventListener.'); 77 76 } 78 77 trunk/src/main/php/net/stubbles/ipo/request/stubAbstractRequest.php
r753 r887 79 79 /** 80 80 * cloning is forbidden 81 *82 * @throws stubException83 81 */ 84 82 protected final function __clone() 85 83 { 86 throw new stub Exception('Cloning of request is not allowed!');84 throw new stubRuntimeException('Cloning of request is not allowed!'); 87 85 } 88 86 trunk/src/main/php/net/stubbles/lang/exceptions/stubException.php
r777 r887 13 13 * @subpackage lang_exceptions 14 14 */ 15 class stubException extends Exception implements stub Object15 class stubException extends Exception implements stubThrowable 16 16 { 17 17 /** … … 67 67 * 68 68 * @return string 69 * @XMLIgnore 69 70 */ 70 71 public function hashCode() … … 78 79 * @param mixed $compare 79 80 * @return bool 80 * @XMLIgnore81 81 */ 82 82 public function equals($compare) trunk/src/main/php/net/stubbles/rdbms/pdo/stubDatabasePDOConnection.php
r482 r887 40 40 { 41 41 if (extension_loaded('pdo') == false) { 42 throw new stub Exception('Can not create ' . __CLASS__ . ', requires PHP-extension "pdo".');42 throw new stubRuntimeException('Can not create ' . __CLASS__ . ', requires PHP-extension "pdo".'); 43 43 } 44 44 trunk/src/main/php/net/stubbles/stubClassLoader.php
r810 r887 346 346 stubClassLoader::load('net.stubbles.lang.stubObject', 347 347 'net.stubbles.lang.stubBaseObject', 348 'net.stubbles.lang.exceptions.stubThrowable', 348 349 'net.stubbles.lang.exceptions.stubException', 350 'net.stubbles.lang.exceptions.stubRuntimeException', 349 351 'net.stubbles.lang.serialize.stubSerializable', 350 352 'net.stubbles.lang.serialize.stubSerializableObject', trunk/src/main/php/net/stubbles/util/ext/stubXPClassLoader.php
r777 r887 42 42 * @param string $version optional the version to use 43 43 * @throws stubIllegalArgumentException 44 * @throws stubException45 44 */ 46 45 public function __construct($version = null) … … 54 53 throw new stubIllegalArgumentException('Can not use a version of the XP-Framework that is lower than 5.0.0.'); 55 54 } elseif (null != $version && file_exists($libPath . 'xp-rt-' . $version . '.xar') == false) { 56 throw new stub Exception('Can not find XP-Framework ' . $version . ' in lib path ' . stubConfig::getLibPath());55 throw new stubRuntimeException('Can not find XP-Framework ' . $version . ' in lib path ' . stubConfig::getLibPath()); 57 56 } elseif (null == $version) { 58 57 $dir = new DirectoryIterator(stubConfig::getLibPath()); … … 70 69 71 70 if (version_compare($version, '5.0.0', '<') == true) { 72 throw new stub Exception('Did not find a copy of the XP-Framework 5.0.0 or higher.');71 throw new stubRuntimeException('Did not find a copy of the XP-Framework 5.0.0 or higher.'); 73 72 } 74 73 } trunk/src/main/php/net/stubbles/util/log/stubLogDataFactory.php
r416 r887 28 28 * @param int $level optional log level of the log data 29 29 * @return stubLogData 30 * @throws stubException in case the created class is not an instance of stubLogData31 30 */ 32 31 public static function create(stubSession $session, $target, $level = stubLogger::LEVEL_INFO) … … 40 39 $logData = new $nqClassName($session, $target, $level); 41 40 if (($logData instanceof stubLogData) == false) { 42 throw new stub Exception('Configured net.stubbles.util.log.class is not an instance of stubLogData.');41 throw new stubRuntimeException('Configured net.stubbles.util.log.class is not an instance of stubLogData.'); 43 42 } 44 43 trunk/src/main/php/net/stubbles/util/xjconf/stubXJConfClassLoader.php
r580 r887 87 87 */ 88 88 if ((@include 'XJConf/XJConfLoader.php') == false) { 89 throw new stub Exception('XJConf could not be found in lib nor in include path.');89 throw new stubRuntimeException('XJConf could not be found in lib nor in include path.'); 90 90 } 91 91 } else { trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisConfig.php
r807 r887 28 28 * @param string $cachePath optional path to cache files 29 29 * @param string $configPath optional path to config files 30 * @throws stubException31 30 */ 32 31 public function __construct($cachePath = null, $configPath = null) … … 35 34 $xjconfProxy->process(); 36 35 if (isset($this->config['parts']) == false || count($this->config['parts']) == 0) { 37 throw new stub Exception('No parts configured.');36 throw new stubRuntimeException('No parts configured.'); 38 37 } 39 38 40 39 if (isset($this->config['frames']) == false || count($this->config['frames']) == 0) { 41 throw new stub Exception('No frames configured.');40 throw new stubRuntimeException('No frames configured.'); 42 41 } 43 42 } trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisIncludeTemplatePageElement.php
r813 r887 57 57 { 58 58 if (isset($context['template']) === false || ($context['template'] instanceof stubMemphisTemplate) === false) { 59 throw new stub Exception('Context contains no template of instance net.stubbles.websites.memphis.stubMemphisTemplate');59 throw new stubRuntimeException('Context contains no template of instance net.stubbles.websites.memphis.stubMemphisTemplate'); 60 60 } 61 61 trunk/src/main/php/net/stubbles/websites/stubFrontController.php
r857 r887 72 72 * @param stubInterceptorInitializer $interceptorInitializer initializer for the interceptors 73 73 * @param stubProcessorResolverFactory $processorResolverFactory factory to create the processor resolver 74 * @throws stubException75 74 */ 76 75 public function __construct(stubRegistryInitializer $registryInitializer, stubInterceptorInitializer $interceptorInitializer, stubProcessorResolverFactory $processorResolverFactory) … … 106 105 $this->request = new $className(); 107 106 if (($this->request instanceof stubRequest) == false) { 108 throw new stub Exception('Configured request class is not an instance of stubRequest.');107 throw new stubRuntimeException('Configured request class is not an instance of stubRequest.'); 109 108 } 110 109 … … 117 116 $this->session = new $className($this->request, stubRegistry::getConfig('net.stubbles.ipo.session.name', stubSession::DEFAULT_SESSION_NAME)); 118 117 if (($this->session instanceof stubSession) == false) { 119 throw new stub Exception('Configured session class is not an instance of stubSession.');118 throw new stubRuntimeException('Configured session class is not an instance of stubSession.'); 120 119 } 121 120 trunk/src/main/php/net/stubbles/websites/xml/stubXMLPostInterceptor.php
r878 r887 49 49 * @param stubSession $session access to session data 50 50 * @param stubResponse $response access to response data 51 * @throws stubException52 51 */ 53 52 public function postProcess(stubRequest $request, stubSession $session, stubResponse $response) … … 60 59 $binder = stubRegistry::get('net.stubbles.ioc.stubBinder'); 61 60 if (($binder instanceof stubBinder) === false) { 62 throw new stub Exception('No instance of net.stubbles.ioc.stubBinder in registry.');61 throw new stubRuntimeException('No instance of net.stubbles.ioc.stubBinder in registry.'); 63 62 } 64 63 … … 127 126 * 128 127 * @return array 129 * @throws stubException130 128 */ 131 129 protected function getCallbackList() … … 133 131 $iniFile = stubConfig::getConfigPath() . '/xsl-callbacks.ini'; 134 132 if (file_exists($iniFile) === false) { 135 throw new stub Exception('Configuration file ' . $iniFile . ' for XSL callback configuration is missing.');133 throw new stubRuntimeException('Configuration file ' . $iniFile . ' for XSL callback configuration is missing.'); 136 134 } 137 135 trunk/src/main/php/net/stubbles/xml/xsl/stubXSLCallback.php
r841 r887 59 59 protected final function __clone() 60 60 { 61 throw new stub Exception('Cloning of ' . __CLASS__ . ' is not allowed.');61 throw new stubRuntimeException('Cloning of ' . __CLASS__ . ' is not allowed.'); 62 62 } 63 63 trunk/src/main/php/net/stubbles/xml/xsl/stubXSLProcessor.php
r870 r887 56 56 { 57 57 if (extension_loaded('xsl') == false) { 58 throw new stub Exception('Can not create ' . __CLASS__ . ', requires PHP-extension "xsl".');58 throw new stubRuntimeException('Can not create ' . __CLASS__ . ', requires PHP-extension "xsl".'); 59 59 } 60 60 trunk/src/test/php/net/stubbles/events/stubLazyEventListenerTestCase.php
r768 r887 30 30 { 31 31 $lazyEventListener = new stubLazyEventListener('stdClass'); 32 $this->expectException('stub Exception');32 $this->expectException('stubRuntimeException'); 33 33 $lazyEventListener->handleEvent(new stubEvent('foo')); 34 34 } … … 40 40 { 41 41 $lazyEventListener = new stubLazyEventListener('stdClass'); 42 $this->expectException('stub Exception');42 $this->expectException('stubRuntimeException'); 43 43 $lazyEventListener->autoremove(); 44 44 } trunk/src/test/php/net/stubbles/util/log/stubLogDataFactoryTestCase.php
r416 r887 45 45 { 46 46 stubRegistry::setConfig('net.stubbles.util.log.class', 'NoLogData'); 47 $this->expectException('stub Exception');47 $this->expectException('stubRuntimeException'); 48 48 stubLogDataFactory::create(new MockstubSession(), 'foo'); 49 49 } trunk/src/test/php/net/stubbles/websites/xml/stubXMLPostInterceptorTestCase.php
r878 r887 180 180 { 181 181 stubRegistry::remove('net.stubbles.ioc.stubBinder'); 182 $this->expectException('stub Exception');182 $this->expectException('stubRuntimeException'); 183 183 $this->xmlPostInterceptor->postProcess($this->mockRequest, $this->mockSession, $this->xmlResponse); 184 184 }
