Added TODO comments and separate code path for unimplemented types in deserialize

This commit is contained in:
Jim Menard 2009-01-07 17:13:21 -05:00
parent 3b921e0b80
commit efd31a8bc5

View File

@ -82,6 +82,7 @@ class BSON
when NULL when NULL
serialize_null_element(@buf, k) serialize_null_element(@buf, k)
when BINARY, UNDEFINED, REF, SYMBOL, CODE_W_SCOPE when BINARY, UNDEFINED, REF, SYMBOL, CODE_W_SCOPE
# TODO
raise "unimplemented type #{type}" raise "unimplemented type #{type}"
else else
raise "unhandled type #{type}" raise "unhandled type #{type}"
@ -132,6 +133,9 @@ class BSON
when NULL when NULL
key = deserialize_element_name(@buf) key = deserialize_element_name(@buf)
doc[key] = nil doc[key] = nil
when BINARY, UNDEFINED, REF, SYMBOL, CODE_W_SCOPE
# TODO
raise "unimplemented type #{type}"
when EOO when EOO
break break
else else