aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core/src/firebase/firestore/remote/serializer.h
diff options
context:
space:
mode:
authorGravatar rsgowman <rgowman@google.com>2018-04-05 12:02:15 -0400
committerGravatar GitHub <noreply@github.com>2018-04-05 12:02:15 -0400
commit73d3f78ada04719b6aacba63b58e8284a4045d98 (patch)
tree6377f4b06bfd821ad73075ab8caac9444fc7b502 /Firestore/core/src/firebase/firestore/remote/serializer.h
parentdb717bf6704b444b093d46f53935402c83441854 (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.h4
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);