def check(id, repair)
      begin
        return get_object(id) != nil
      rescue PEROBS::FatalError => e
        PEROBS.log.error "Cannot read object with ID #{id}: #{e.message}"
        if repair
          begin
            PEROBS.log.error "Discarding broken object with ID #{id}"
            @flat_file.delete_obj_by_id(id)
          rescue PEROBS::FatalError
          end
        end
      end

      return false
    end
def check(id, repair)
      begin
        return get_object(id) != nil
      rescue PEROBS::FatalError => e
        PEROBS.log.error "Cannot read object with ID #{id}: #{e.message}"
        if repair
          begin
            PEROBS.log.error "Discarding broken object with ID #{id}"
            @flat_file.delete_obj_by_id(id)
          rescue PEROBS::FatalError
          end
        end
      end

      return false
    end
Check if the stored object is syntactically correct.
 @param id [Integer] Object ID
 @param repair [TrueClass/FalseClass] True if an repair attempt should be
        made.
 @return [TrueClass/FalseClass] True if the object is OK, otherwise
         false.