Commonize error handling across all operations

This commit is contained in:
josh committed 2021-10-21 18:35:58 -04:00
1 parent 441fc9bc65
commit 556c821cc6
4 files changed
+7 -10

No files matched your search

+3 -3
View File
@@ -136,8 +136,8 @@ module Rscons
env.process
end
0
rescue BuildError => be
Ansi.write($stderr, :red, be.message, :reset, "\n")
rescue RsconsError => e
Ansi.write($stderr, :red, e.message, :reset, "\n")
1
end
end
@@ -193,7 +193,7 @@ module Rscons
co = ConfigureOp.new(options)
begin
@script.configure(co)
rescue ConfigureOp::ConfigureFailure
rescue RsconsError
Ansi.write($stderr, :red, "Configuration failed", :reset, "\n")
rv = 1
end