Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
4501598f
Commit
4501598f
authored
Jul 12, 2014
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use SystemStackError instead of RuntimeError
parent
4a6c651f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
1 deletion
+3
-1
include/mruby.h
include/mruby.h
+1
-0
src/error.c
src/error.c
+1
-0
src/vm.c
src/vm.c
+1
-1
No files found.
include/mruby.h
View file @
4501598f
...
...
@@ -385,6 +385,7 @@ void mrb_print_error(mrb_state *mrb);
#define E_SYNTAX_ERROR (mrb_class_get(mrb, "SyntaxError"))
#define E_LOCALJUMP_ERROR (mrb_class_get(mrb, "LocalJumpError"))
#define E_REGEXP_ERROR (mrb_class_get(mrb, "RegexpError"))
#define E_SYSSTACK_ERROR (mrb_class_get(mrb, "SystemStackError"))
#define E_NOTIMP_ERROR (mrb_class_get(mrb, "NotImplementedError"))
#define E_FLOATDOMAIN_ERROR (mrb_class_get(mrb, "FloatDomainError"))
...
...
src/error.c
View file @
4501598f
...
...
@@ -455,4 +455,5 @@ mrb_init_exception(mrb_state *mrb)
mrb
->
nomem_err
=
mrb_obj_ptr
(
mrb_exc_new_str
(
mrb
,
runtime_error
,
mrb_str_new_lit
(
mrb
,
"Out of memory"
)));
script_error
=
mrb_define_class
(
mrb
,
"ScriptError"
,
mrb
->
eException_class
);
/* 15.2.37 */
mrb_define_class
(
mrb
,
"SyntaxError"
,
script_error
);
/* 15.2.38 */
mrb_define_class
(
mrb
,
"SystemStackError"
,
exception
);
}
src/vm.c
View file @
4501598f
...
...
@@ -160,7 +160,7 @@ stack_extend_alloc(mrb_state *mrb, int room, int keep)
to prevent infinite recursion. However, do this only after resizing the stack, so mrb_raise has stack space to work with. */
if
(
size
>
MRB_STACK_MAX
)
{
init_new_stack_space
(
mrb
,
room
,
keep
);
mrb_raise
(
mrb
,
E_
RUNTIME
_ERROR
,
"stack level too deep. (limit="
TO_STR
(
MRB_STACK_MAX
)
")"
);
mrb_raise
(
mrb
,
E_
SYSSTACK
_ERROR
,
"stack level too deep. (limit="
TO_STR
(
MRB_STACK_MAX
)
")"
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment