class Mongo::Error::MissingFileChunk
Raised if the next chunk when reading from a GridFSBucket does not have the expected sequence number (n).
@since 2.1.0
Public Class Methods
new(expected_n, chunk)
click to toggle source
Create the new exception.
@example Create the new exception.
Mongo::Error::MissingFileChunk.new(expected_n, chunk)
@param [ Integer ] expected_n The expected index value. @param [ Grid::File::Chunk
] chunk The chunk read from GridFS.
@since 2.1.0
Calls superclass method
Mongo::Error::new
# File lib/mongo/error/missing_file_chunk.rb, line 33 def initialize(expected_n, chunk) super("Unexpected chunk in sequence. Expected next chunk to have index #{expected_n} but it has index #{chunk.n}") end