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
cf80e7fe
Commit
cf80e7fe
authored
May 04, 2014
by
yui-knk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix comment of exc_inspect (and adjust spaces)
parent
8e4d3bb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
14 deletions
+17
-14
src/error.c
src/error.c
+17
-14
No files found.
src/error.c
View file @
cf80e7fe
...
...
@@ -115,7 +115,10 @@ exc_message(mrb_state *mrb, mrb_value exc)
* call-seq:
* exception.inspect -> string
*
* Return this exception's class name an message
* Returns this exception's file name, line number,
* message and class name.
* If file name or line number is not set,
* returns message and class name.
*/
static
mrb_value
...
...
@@ -444,18 +447,18 @@ mrb_init_exception(mrb_state *mrb)
{
struct
RClass
*
e
;
mrb
->
eException_class
=
e
=
mrb_define_class
(
mrb
,
"Exception"
,
mrb
->
object_class
);
/* 15.2.22 */
mrb_define_class_method
(
mrb
,
e
,
"exception"
,
mrb_instance_new
,
MRB_ARGS_ANY
());
mrb_define_method
(
mrb
,
e
,
"exception"
,
exc_exception
,
MRB_ARGS_ANY
());
mrb_define_method
(
mrb
,
e
,
"initialize"
,
exc_initialize
,
MRB_ARGS_ANY
());
mrb_define_method
(
mrb
,
e
,
"=="
,
exc_equal
,
MRB_ARGS_REQ
(
1
));
mrb_define_method
(
mrb
,
e
,
"to_s"
,
exc_to_s
,
MRB_ARGS_NONE
());
mrb_define_method
(
mrb
,
e
,
"message"
,
exc_message
,
MRB_ARGS_NONE
());
mrb_define_method
(
mrb
,
e
,
"inspect"
,
exc_inspect
,
MRB_ARGS_NONE
());
mrb_define_method
(
mrb
,
e
,
"backtrace"
,
mrb_exc_backtrace
,
MRB_ARGS_NONE
());
mrb
->
eStandardError_class
=
mrb_define_class
(
mrb
,
"StandardError"
,
mrb
->
eException_class
);
/* 15.2.23 */
mrb
->
eException_class
=
e
=
mrb_define_class
(
mrb
,
"Exception"
,
mrb
->
object_class
);
/* 15.2.22 */
mrb_define_class_method
(
mrb
,
e
,
"exception"
,
mrb_instance_new
,
MRB_ARGS_ANY
());
mrb_define_method
(
mrb
,
e
,
"exception"
,
exc_exception
,
MRB_ARGS_ANY
());
mrb_define_method
(
mrb
,
e
,
"initialize"
,
exc_initialize
,
MRB_ARGS_ANY
());
mrb_define_method
(
mrb
,
e
,
"=="
,
exc_equal
,
MRB_ARGS_REQ
(
1
));
mrb_define_method
(
mrb
,
e
,
"to_s"
,
exc_to_s
,
MRB_ARGS_NONE
());
mrb_define_method
(
mrb
,
e
,
"message"
,
exc_message
,
MRB_ARGS_NONE
());
mrb_define_method
(
mrb
,
e
,
"inspect"
,
exc_inspect
,
MRB_ARGS_NONE
());
mrb_define_method
(
mrb
,
e
,
"backtrace"
,
mrb_exc_backtrace
,
MRB_ARGS_NONE
());
mrb
->
eStandardError_class
=
mrb_define_class
(
mrb
,
"StandardError"
,
mrb
->
eException_class
);
/* 15.2.23 */
mrb_define_class
(
mrb
,
"RuntimeError"
,
mrb
->
eStandardError_class
);
/* 15.2.28 */
e
=
mrb_define_class
(
mrb
,
"ScriptError"
,
mrb
->
eException_class
);
/* 15.2.37 */
mrb_define_class
(
mrb
,
"SyntaxError"
,
e
);
/* 15.2.38 */
e
=
mrb_define_class
(
mrb
,
"ScriptError"
,
mrb
->
eException_class
);
/* 15.2.37 */
mrb_define_class
(
mrb
,
"SyntaxError"
,
e
);
/* 15.2.38 */
}
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