Changeset 574
- Timestamp:
- 04/19/07 22:11:34 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/info/phing/tasks/stubInitTask.php
r571 r574 7 7 * @package stubbles 8 8 * @subpackage phing 9 *10 * @todo Try to catch errors and let the build fail11 9 */ 12 10 /** … … 51 49 public function main() 52 50 { 53 require_once $this->configPath . '/php/config.php'; 51 @include_once $this->configPath . '/php/config.php'; 52 if (!class_exists('stubConfig', false)) { 53 $this->log('Error loading Stubbles configuration from ' . $this->configPath . '/php/config.php', Project::MSG_ERR); 54 throw new BuildException('Error loading Stubbles configuration from ' . $this->configPath . '/php/config.php'); 55 } 54 56 if (stubConfig::useStar() == true) { 55 require_once stubConfig::getLibPath() . '/stubbles.php'; 57 if (!@include_once stubConfig::getLibPath() . '/stubbles.php') { 58 $this->log('Error loading Stubbles library from ' . stubConfig::getLibPath() . '/stubbles.php', Project::MSG_ERR); 59 $this->log('Either stubConfig::getLibPath() is not correctly set, or stubbles.php does not exist.', Project::MSG_ERR); 60 throw new BuildException('Error loading Stubbles library from ' . stubConfig::getLibPath() . '/stubbles.php'); 61 } 56 62 } else { 57 require_once stubConfig::getLibPath() . '/starReader.php'; 58 require_once stubConfig::getSourcePath() . '/php/net/stubbles/stubClassLoader.php'; 63 if (!@include_once stubConfig::getLibPath() . '/starReader.php') { 64 $this->log('Error loading StarReader from ' . stubConfig::getLibPath() . '/starReader.php', Project::MSG_ERR); 65 $this->log('Either stubConfig::getLibPath() is not correctly set, or starReader.php does not exist.', Project::MSG_ERR); 66 throw new BuildException('Error loading StarReader from ' . stubConfig::getLibPath() . '/starReader.php'); 67 } 68 if (!@include_once stubConfig::getSourcePath() . '/php/net/stubbles/stubClassLoader.php') { 69 $this->log('Error loading stubClassLoader from ' . stubConfig::getSourcePath() . '/php/net/stubbles/stubClassLoader.php', Project::MSG_ERR); 70 $this->log('Either stubConfig::getSourcePath() is not correctly set, or you are not using a source distribution.', Project::MSG_ERR); 71 throw new BuildException('Error loading stubClassLoader from ' . stubConfig::getSourcePath() . '/php/net/stubbles/stubClassLoader.php'); 72 } 59 73 } 60 74
