lib/dnn/lib/image_io.rb in ruby-dnn-0.1.6 vs lib/dnn/lib/image_io.rb in ruby-dnn-0.1.7

- old
+ new

@@ -20,9 +20,11 @@ when /\.bmp$/ _write_bmp(file_name, nary) when /\.jpg$/ _write_jpg(file_name, nary, quality) end + rescue => ex + raise ImageIO::WriteError.new(ex.message) end end class ImageIO::Error < StandardError; end