// Copyright 2023 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SERVICES_WEBNN_ERROR_H_ #define SERVICES_WEBNN_ERROR_H_ #include <string> #include "services/webnn/public/mojom/webnn_context_provider.mojom.h" namespace webnn { // Bad messages Mojo errors. inline constexpr char kBadMessageInvalidBuffer[] = …; inline constexpr char kBadMessageInvalidGraph[] = …; inline constexpr char kBadMessageOnBuiltGraphBuilder[] = …; template <typename MojoResultType> mojo::StructPtr<MojoResultType> ToError(const mojom::Error::Code& error_code, const std::string& error_message) { … } } // namespace webnn #endif // SERVICES_WEBNN_ERROR_H_