--
-$Id: ChangeLog 39 2005-04-28 21:08:11Z tilman $
+$Id: ChangeLog 40 2005-05-25 20:19:45Z tilman $
++
+2005-05-25 Tilman Sauerbeck (tilman at code-monkey de)
+ * lib/redact/app.rb: Make sure to delete the output file if
+ there's an exception while we're writing it
+
2005-04-28 Tilman Sauerbeck (tilman at code-monkey de)
* lib/redact/app.rb: Don't abort if embryo_cc's return code is 1
(which means 'succeeded, but with warnings')
#--
-# $Id: app.rb 39 2005-04-28 21:08:11Z tilman $
+# $Id: app.rb 40 2005-05-25 20:19:45Z tilman $
#
# Copyright (c) 2005 Tilman Sauerbeck (tilman at code-monkey de)
#
amx = compile_embryo
- Eet::File.open(@options.output, "w") do |ef|
- dump_amx(amx, ef)
-
- dump_header(ef)
- dump_collections(ef)
- dump_fonts(ef)
- dump_images(ef)
- dump_source(ef)
- dump_fontmap(ef)
+ begin
+ Eet::File.open(@options.output, "w") do |ef|
+ dump_amx(amx, ef)
+
+ dump_header(ef)
+ dump_collections(ef)
+ dump_fonts(ef)
+ dump_images(ef)
+ dump_source(ef)
+ dump_fontmap(ef)
+ end
+ rescue Exception
+ File.rm_f(@options.output)
+ raise
end
end