chromium/third_party/abseil-cpp/absl/status/status.cc

// Copyright 2019 The Abseil Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "absl/status/status.h"

#include <errno.h>

#include <atomic>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <memory>
#include <ostream>
#include <string>

#include "absl/base/attributes.h"
#include "absl/base/config.h"
#include "absl/base/internal/raw_logging.h"
#include "absl/base/internal/strerror.h"
#include "absl/base/macros.h"
#include "absl/base/no_destructor.h"
#include "absl/base/nullability.h"
#include "absl/debugging/stacktrace.h"
#include "absl/debugging/symbolize.h"
#include "absl/status/internal/status_internal.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
#include "absl/strings/str_split.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"

namespace absl {
ABSL_NAMESPACE_BEGIN

static_assert;

std::string StatusCodeToString(StatusCode code) {}

std::ostream& operator<<(std::ostream& os, StatusCode code) {}

absl::Nonnull<const std::string*> Status::EmptyString() {}

#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL
constexpr const char Status::kMovedFromString[];
#endif

absl::Nonnull<const std::string*> Status::MovedFromString() {}

Status::Status(absl::StatusCode code, absl::string_view msg)
    :{}

absl::Nonnull<status_internal::StatusRep*> Status::PrepareToModify(
    uintptr_t rep) {}

std::string Status::ToStringSlow(uintptr_t rep, StatusToStringMode mode) {}

std::ostream& operator<<(std::ostream& os, const Status& x) {}

Status AbortedError(absl::string_view message) {}

Status AlreadyExistsError(absl::string_view message) {}

Status CancelledError(absl::string_view message) {}

Status DataLossError(absl::string_view message) {}

Status DeadlineExceededError(absl::string_view message) {}

Status FailedPreconditionError(absl::string_view message) {}

Status InternalError(absl::string_view message) {}

Status InvalidArgumentError(absl::string_view message) {}

Status NotFoundError(absl::string_view message) {}

Status OutOfRangeError(absl::string_view message) {}

Status PermissionDeniedError(absl::string_view message) {}

Status ResourceExhaustedError(absl::string_view message) {}

Status UnauthenticatedError(absl::string_view message) {}

Status UnavailableError(absl::string_view message) {}

Status UnimplementedError(absl::string_view message) {}

Status UnknownError(absl::string_view message) {}

bool IsAborted(const Status& status) {}

bool IsAlreadyExists(const Status& status) {}

bool IsCancelled(const Status& status) {}

bool IsDataLoss(const Status& status) {}

bool IsDeadlineExceeded(const Status& status) {}

bool IsFailedPrecondition(const Status& status) {}

bool IsInternal(const Status& status) {}

bool IsInvalidArgument(const Status& status) {}

bool IsNotFound(const Status& status) {}

bool IsOutOfRange(const Status& status) {}

bool IsPermissionDenied(const Status& status) {}

bool IsResourceExhausted(const Status& status) {}

bool IsUnauthenticated(const Status& status) {}

bool IsUnavailable(const Status& status) {}

bool IsUnimplemented(const Status& status) {}

bool IsUnknown(const Status& status) {}

StatusCode ErrnoToStatusCode(int error_number) {}

namespace {
std::string MessageForErrnoToStatus(int error_number,
                                    absl::string_view message) {}
}  // namespace

Status ErrnoToStatus(int error_number, absl::string_view message) {}

absl::Nonnull<const char*> StatusMessageAsCStr(const Status& status) {}

ABSL_NAMESPACE_END
}  // namespace absl