ant_on_air: Replace task makes Ant fail if file does not exist (instead of throwing an uncaught error)
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/60b04527 Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/60b04527 Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/60b04527 Branch: refs/heads/feature/flash-downloader Commit: 60b0452754aef2c8759e98aeac674cddcac0127d Parents: e62376e Author: Josh Tynjala <joshtynj...@apache.org> Authored: Mon Nov 21 14:06:17 2016 -0800 Committer: Josh Tynjala <joshtynj...@apache.org> Committed: Mon Nov 21 14:06:17 2016 -0800 ---------------------------------------------------------------------- .../ant_on_air/src/org/apache/flex/ant/tags/Replace.as | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/60b04527/flex-installer/ant_on_air/src/org/apache/flex/ant/tags/Replace.as ---------------------------------------------------------------------- diff --git a/flex-installer/ant_on_air/src/org/apache/flex/ant/tags/Replace.as b/flex-installer/ant_on_air/src/org/apache/flex/ant/tags/Replace.as index 2873ee1..afb95b7 100644 --- a/flex-installer/ant_on_air/src/org/apache/flex/ant/tags/Replace.as +++ b/flex-installer/ant_on_air/src/org/apache/flex/ant/tags/Replace.as @@ -18,6 +18,7 @@ //////////////////////////////////////////////////////////////////////////////// package org.apache.flex.ant.tags { + import flash.errors.IOError; import flash.filesystem.File; import flash.filesystem.FileMode; import flash.filesystem.FileStream; @@ -62,6 +63,10 @@ package org.apache.flex.ant.tags try { var f:File = File.applicationDirectory.resolvePath(file); + if(!f.exists) + { + throw new IOError("File not found: " + f.nativePath); + } } catch (e:Error) {