Changeset 55
- Timestamp:
- 04/20/06 15:16:59 (3 years ago)
- Files:
-
- trunk/classes/phing/tasks/system/PhingTask.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/classes/phing/tasks/system/PhingTask.php
r43 r55 74 74 private $newProject; 75 75 76 /** Fail the build process when the called build fails? */ 77 private $haltOnFailure = false; 78 79 /** 80 * If true, abort the build process if there is a problem with or in the target build file. 81 * Defaults to false. 82 * 83 * @param boolean new value 84 */ 85 public function setHaltOnFailure($hof) { 86 $this->haltOnFailure = (boolean) $hof; 87 } 88 76 89 /** 77 90 * Creates a Project instance for the project to call. … … 147 160 $savedPhingFile = $this->phingFile; 148 161 $savedTarget = $this->newTarget; 162 $buildFailed = false; 149 163 150 164 // set no specific target for files in filesets … … 241 255 242 256 } catch (Exception $e) { 257 $buildFailed = true; 243 258 $this->log($e->getMessage(), PROJECT_MSG_ERR); 244 259 … … 263 278 chdir($this->dir->getAbsolutePath()); 264 279 } 280 281 if ($this->haltOnFailure == true && $buildFailed == true) 282 throw new BuildException("Execution of the target buildfile failed. Aborting."); 265 283 } 266 284
