lib/perobs/BTreeBlob.rb in perobs-2.4.0 vs lib/perobs/BTreeBlob.rb in perobs-2.4.1
- old
+ new
@@ -26,10 +26,11 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
require 'zlib'
require 'perobs/Log'
+require 'perobs/RobustFile'
module PEROBS
# This class manages the usage of the data blobs in the corresponding
# HashedBlobsDB object.
@@ -207,10 +208,10 @@
# @param address [Fixnum] offset in the file
# @return [Fixnum] number of bytes written
def write_to_blobs_file(raw, address)
begin
File.write(@blobs_file_name, raw, address)
- rescue => e
+ rescue IOError => e
PEROBS.log.fatal "Cannot write blobs file #{@blobs_file_name}: " +
e.message
end
end