aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core/src/firebase/firestore/util/statusor.h
diff options
context:
space:
mode:
authorGravatar Gil <mcg@google.com>2018-06-12 09:36:08 -0700
committerGravatar GitHub <noreply@github.com>2018-06-12 09:36:08 -0700
commit9e14b80e0716c2be71c6100cad7aa7c61ac46c6e (patch)
tree09d4d4583571b56feb89f809a24626cef14a3356 /Firestore/core/src/firebase/firestore/util/statusor.h
parentf5bf0a37a7dd40e7538a1aed77af05471b7fe713 (diff)
Create Status objects from errno (#1374)
* Add a portable interface to strerror * Add Status::FromErrno * Add strerror_test.cc to the Xcode project * Use glibc feature selection macros instead of return-type overloads * Fix tensorflow references
Diffstat (limited to 'Firestore/core/src/firebase/firestore/util/statusor.h')
-rw-r--r--Firestore/core/src/firebase/firestore/util/statusor.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/Firestore/core/src/firebase/firestore/util/statusor.h b/Firestore/core/src/firebase/firestore/util/statusor.h
index dc5644a..9985956 100644
--- a/Firestore/core/src/firebase/firestore/util/statusor.h
+++ b/Firestore/core/src/firebase/firestore/util/statusor.h
@@ -59,7 +59,8 @@
//
// StatusOr<Foo*> FooFactory::MakeNewFoo(int arg) {
// if (arg <= 0) {
-// return tensorflow::InvalidArgument("Arg must be positive");
+// return Status(FirestoreErrorCode::InvalidArgument,
+// "Arg must be positive");
// } else {
// return new Foo(arg);
// }
@@ -149,7 +150,7 @@ class ABSL_MUST_USE_RESULT StatusOr
//
// REQUIRES: !status.ok(). This requirement is DCHECKed.
// In optimized builds, passing Status::OK() here will have the effect
- // of passing tensorflow::error::INTERNAL as a fallback.
+ // of passing FirestoreErrorCode::Internal as a fallback.
StatusOr(const Status& status); // NOLINT: allow non-explicit 1-param ctor
StatusOr& operator=(const Status& status);