raise Rscons::BuildError on a build failure

This commit is contained in:
Josh Holtrop 2013-08-12 13:13:22 -04:00
parent 052b1afe19
commit 289d27d41d
3 changed files with 5 additions and 3 deletions

View File

@ -17,4 +17,7 @@ module Rscons
Object, Object,
Program, Program,
] ]
class BuildError < Exception
end
end end

View File

@ -149,8 +149,7 @@ module Rscons
@targets.each do |target, info| @targets.each do |target, info|
next if targets_processed.include?(target) next if targets_processed.include?(target)
unless process_target.call(target) unless process_target.call(target)
$stderr.puts "Error: failed to build #{target}" raise BuildError.new("Failed to build #{target}")
break
end end
end end
cache.write cache.write

View File

@ -1,4 +1,4 @@
module Rscons module Rscons
# gem version # gem version
VERSION = "0.0.3" VERSION = "0.0.4"
end end