FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
mruby/include/mruby/error.h at master · TressaOrg/mruby · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
TressaOrg
/
mruby
Public
forked from
mruby/mruby
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
mruby
/
include
/
mruby
/
error.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
69 lines (56 loc) · 1.79 KB
Breadcrumbs
mruby
/
include
/
mruby
/
error.h
Copy path
File metadata and controls
69 lines (56 loc) · 1.79 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
** mruby/error.h - Exception class
**
** See Copyright Notice in mruby.h
*/
#ifndef
MRUBY_ERROR_H
#define
MRUBY_ERROR_H
#include
"common.h"
/**
* MRuby error handling.
*/
MRB_BEGIN_DECL
struct
RException
{
MRB_OBJECT_HEADER
;
struct
iv_tbl
*
iv
;
};
#define
mrb_exc_ptr
(
v
) ((struct RException*)mrb_ptr(v))
MRB_API
void
mrb_sys_fail
(
mrb_state
*
mrb
,
const
char
*
mesg
);
MRB_API
mrb_value
mrb_exc_new_str
(
mrb_state
*
mrb
,
struct
RClass
*
c
,
mrb_value
str
);
#define
mrb_exc_new_str_lit
(
mrb
,
c
,
lit
) mrb_exc_new_str(mrb, c, mrb_str_new_lit(mrb, lit))
MRB_API
mrb_value
mrb_make_exception
(
mrb_state
*
mrb
,
int
argc
,
const
mrb_value
*
argv
);
MRB_API
mrb_value
mrb_exc_backtrace
(
mrb_state
*
mrb
,
mrb_value
exc
);
MRB_API
mrb_value
mrb_get_backtrace
(
mrb_state
*
mrb
);
MRB_API
mrb_noreturn
void
mrb_no_method_error
(
mrb_state
*
mrb
,
mrb_sym
id
,
mrb_value
args
,
const
char
*
fmt
, ...);
/* declaration for fail method */
MRB_API
mrb_value
mrb_f_raise
(
mrb_state
*
,
mrb_value
);
/**
* Protect
*
* @mrbgem mruby-error
*/
MRB_API
mrb_value
mrb_protect
(
mrb_state
*
mrb
,
mrb_func_t
body
,
mrb_value
data
,
mrb_bool
*
state
);
/**
* Ensure
*
* @mrbgem mruby-error
*/
MRB_API
mrb_value
mrb_ensure
(
mrb_state
*
mrb
,
mrb_func_t
body
,
mrb_value
b_data
,
mrb_func_t
ensure
,
mrb_value
e_data
);
/**
* Rescue
*
* @mrbgem mruby-error
*/
MRB_API
mrb_value
mrb_rescue
(
mrb_state
*
mrb
,
mrb_func_t
body
,
mrb_value
b_data
,
mrb_func_t
rescue
,
mrb_value
r_data
);
/**
* Rescue exception
*
* @mrbgem mruby-error
*/
MRB_API
mrb_value
mrb_rescue_exceptions
(
mrb_state
*
mrb
,
mrb_func_t
body
,
mrb_value
b_data
,
mrb_func_t
rescue
,
mrb_value
r_data
,
mrb_int
len
,
struct
RClass
*
*
classes
);
MRB_END_DECL
#endif
/* MRUBY_ERROR_H */
Back
|
FazBrowse Home
|
New Git URL