-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.h
More file actions
52 lines (40 loc) · 837 Bytes
/
errors.h
File metadata and controls
52 lines (40 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef V8GO_ERRORS_H
#define V8GO_ERRORS_H
typedef struct {
char* msg;
char* location;
char* stack;
} RtnError;
#ifdef __cplusplus
#include "deps/include/v8-local-handle.h"
namespace v8 {
class Isolate;
class Context;
class TryCatch;
} // namespace v8
extern "C" {
extern RtnError ExceptionError(v8::TryCatch& try_catch,
v8::Isolate* iso,
v8::Local<v8::Context> ctx);
#endif
extern void ErrorRelease(RtnError err);
typedef struct m_value m_value;
typedef m_value* ValuePtr;
typedef enum {
ERROR_RANGE = 1,
ERROR_REFERENCE,
ERROR_SYNTAX,
ERROR_TYPE,
ERROR_WASM_COMPILE,
ERROR_WASM_LINK,
ERROR_WASM_RUNTIME,
ERROR_GENERIC,
} ErrorTypeIndex;
typedef struct {
ValuePtr value;
RtnError error;
} RtnValue;
#ifdef __cplusplus
}
#endif
#endif