diff options
author | rsgowman <rgowman@google.com> | 2018-04-05 12:02:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-05 12:02:15 -0400 |
commit | 73d3f78ada04719b6aacba63b58e8284a4045d98 (patch) | |
tree | 6377f4b06bfd821ad73075ab8caac9444fc7b502 /Firestore/core/src/firebase/firestore/remote/serializer.h | |
parent | db717bf6704b444b093d46f53935402c83441854 (diff) |
Add error handling for serializer (for serializing case only) (#991)
Deserializing not handled yet.
Note that the serializing case is fairly uninteresting, as assuming
valid input is passed in, there's no real reason why it should fail (and
if it does fail, it indicates a gross violation of our understanding of
the system.)
Diffstat (limited to 'Firestore/core/src/firebase/firestore/remote/serializer.h')
-rw-r--r-- | Firestore/core/src/firebase/firestore/remote/serializer.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Firestore/core/src/firebase/firestore/remote/serializer.h b/Firestore/core/src/firebase/firestore/remote/serializer.h index 10cacbc..454c3ad 100644 --- a/Firestore/core/src/firebase/firestore/remote/serializer.h +++ b/Firestore/core/src/firebase/firestore/remote/serializer.h @@ -24,6 +24,8 @@ #include "Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.h" #include "Firestore/core/src/firebase/firestore/model/field_value.h" #include "Firestore/core/src/firebase/firestore/util/firebase_assert.h" +#include "Firestore/core/src/firebase/firestore/util/status.h" +#include "absl/base/attributes.h" namespace firebase { namespace firestore { @@ -70,7 +72,7 @@ class Serializer { // TODO(rsgowman): If we never support any output except to a vector, it may // make sense to have Serializer own the vector and provide an accessor rather // than asking the user to create it first. - static void EncodeFieldValue( + static util::Status EncodeFieldValue( const firebase::firestore::model::FieldValue& field_value, std::vector<uint8_t>* out_bytes); |