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