Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
handle_exception.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_SHELL_PLATFORM_FUCHSIA_RUNTIME_DART_UTILS_HANDLE_EXCEPTION_H_
6#define FLUTTER_SHELL_PLATFORM_FUCHSIA_RUNTIME_DART_UTILS_HANDLE_EXCEPTION_H_
7
8#include <lib/sys/cpp/service_directory.h>
9
10#include <memory>
11#include <string>
12
13#include "third_party/dart/runtime/include/dart_api.h"
14
15namespace dart_utils {
16
17// If |result| is a Dart Exception, passes the exception message and stack trace
18// to the crash analyzer service for further handling.
19void HandleIfException(std::shared_ptr<::sys::ServiceDirectory> services,
20 const std::string& component_url,
22
23// Passes the exception message and stack trace to the crash analyzer service
24// for further handling.
25void HandleException(std::shared_ptr<::sys::ServiceDirectory> services,
26 const std::string& component_url,
27 const std::string& error,
28 const std::string& stack_trace);
29
30} // namespace dart_utils
31
32#endif // FLUTTER_SHELL_PLATFORM_FUCHSIA_RUNTIME_DART_UTILS_HANDLE_EXCEPTION_H_
struct _Dart_Handle * Dart_Handle
Definition dart_api.h:258
const uint8_t uint32_t uint32_t GError ** error
GAsyncResult * result
void HandleIfException(std::shared_ptr<::sys::ServiceDirectory > services, const std::string &component_url, Dart_Handle result)
void HandleException(std::shared_ptr<::sys::ServiceDirectory > services, const std::string &component_url, const std::string &error, const std::string &stack_trace)