Skip to content

Commit

Permalink
Add FIXMEs for error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
johnl committed Jan 23, 2011
1 parent 07ffc14 commit 3d0c053
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/rados.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,15 @@ def initialize(attributes = {})
end

def write(buf)
# FIXME: If the following does a part write and raises an
# exception then the @position is invalid
@position += pool.write(id, buf, :offset => @position)
self
end

def read
# FIXME: If the following does a part read and raises an
# exception then the @position is invalid
buf = pool.read(id, :offset => @position)
if buf.size == 0
nil
Expand Down

0 comments on commit 3d0c053

Please sign in to comment.