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 LIB_TONIC_LOGGING_DART_ERROR_H_
6#define LIB_TONIC_LOGGING_DART_ERROR_H_
7
8#include "third_party/dart/runtime/include/dart_api.h"
9
10namespace tonic {
11
12namespace DartError {
13extern const char kInvalidArgument[];
14} // namespace DartError
15
16bool LogIfError(Dart_Handle handle);
17
18enum DartErrorHandleType {
19 kNoError,
20 kUnknownErrorType,
21 kApiErrorType,
22 kCompilationErrorType,
23};
24
25DartErrorHandleType GetErrorHandleType(Dart_Handle handle);
26
27int GetErrorExitCode(Dart_Handle handle);
28
29} // namespace tonic
30
31#endif // LIB_TONIC_DART_ERROR_H_
32