1/* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7 http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is distributed on an "AS IS" BASIS,
11WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14==============================================================================*/
15
16#ifndef TENSORFLOW_CORE_PLATFORM_ERRORS_H_
17#define TENSORFLOW_CORE_PLATFORM_ERRORS_H_
18
19#include <sstream>
20#include <string>
21#include <utility>
22
23#include "absl/base/attributes.h"
24#include "absl/strings/str_join.h"
25#include "tensorflow/core/platform/logging.h"
26#include "tensorflow/core/platform/macros.h"
27#include "tensorflow/core/platform/status.h"
28#include "tensorflow/core/platform/str_util.h"
29#include "tensorflow/core/platform/strcat.h"
30#include "tensorflow/tsl/platform/errors.h"
31
32namespace tensorflow {
33namespace errors {
34
35// NOLINTBEGIN(misc-unused-using-decls)
36// Maps UNIX errors into a Status.
37using error::OK;
38using tsl::errors::Aborted;
39using tsl::errors::AbortedWithPayloads;
40using tsl::errors::AlreadyExists;
41using tsl::errors::AlreadyExistsWithPayloads;
42using tsl::errors::AppendToMessage;
43using tsl::errors::Cancelled;
44using tsl::errors::CancelledWithPayloads;
45using tsl::errors::CopyPayloads;
46using tsl::errors::Create;
47using tsl::errors::CreateWithUpdatedMessage;
48using tsl::errors::DataLoss;
49using tsl::errors::DataLossWithPayloads;
50using tsl::errors::DeadlineExceeded;
51using tsl::errors::DeadlineExceededWithPayloads;
52using tsl::errors::FailedPrecondition;
53using tsl::errors::FailedPreconditionWithPayloads;
54using tsl::errors::FormatColocationNodeForError;
55using tsl::errors::FormatFunctionForError;
56using tsl::errors::FormatNodeNameForError;
57using tsl::errors::FormatNodeNamesForError;
58using tsl::errors::FormatOriginalNodeLocationForError;
59using tsl::errors::GetPayloads;
60using tsl::errors::InsertPayloads;
61using tsl::errors::Internal;
62using tsl::errors::InternalWithPayloads;
63using tsl::errors::InvalidArgument;
64using tsl::errors::InvalidArgumentWithPayloads;
65using tsl::errors::IOError;
66using tsl::errors::IsAborted;
67using tsl::errors::IsAlreadyExists;
68using tsl::errors::IsCancelled;
69using tsl::errors::IsDataLoss;
70using tsl::errors::IsDeadlineExceeded;
71using tsl::errors::IsFailedPrecondition;
72using tsl::errors::IsInternal;
73using tsl::errors::IsInvalidArgument;
74using tsl::errors::IsNotFound;
75using tsl::errors::IsOutOfRange;
76using tsl::errors::IsPermissionDenied;
77using tsl::errors::IsResourceExhausted;
78using tsl::errors::IsUnauthenticated;
79using tsl::errors::IsUnavailable;
80using tsl::errors::IsUnimplemented;
81using tsl::errors::IsUnknown;
82using tsl::errors::NotFound;
83using tsl::errors::NotFoundWithPayloads;
84using tsl::errors::OutOfRange;
85using tsl::errors::OutOfRangeWithPayloads;
86using tsl::errors::PermissionDenied;
87using tsl::errors::PermissionDeniedWithPayloads;
88using tsl::errors::ReplaceErrorFromNonCommunicationOps;
89using tsl::errors::ResourceExhausted;
90using tsl::errors::ResourceExhaustedWithPayloads;
91using tsl::errors::Unauthenticated;
92using tsl::errors::UnauthenticatedWithPayloads;
93using tsl::errors::Unavailable;
94using tsl::errors::UnavailableWithPayloads;
95using tsl::errors::Unimplemented;
96using tsl::errors::UnimplementedWithPayloads;
97using tsl::errors::Unknown;
98using tsl::errors::UnknownPayloads;
99namespace internal {
100using tsl::errors::internal::PrepareForStrCat;
101}
102// NOLINTEND(misc-unused-using-decls)
103
104} // namespace errors
105} // namespace tensorflow
106
107#endif // TENSORFLOW_CORE_PLATFORM_ERRORS_H_
108