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
0fe62ddc
Commit
0fe62ddc
authored
May 04, 2014
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2183 from yui-knk/fix-error-comment
Fix comment of exc_inspect (and adjust spaces)
parents
b87bfe73
cf80e7fe
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 @
0fe62ddc
...
@@ -115,7 +115,10 @@ exc_message(mrb_state *mrb, mrb_value exc)
...
@@ -115,7 +115,10 @@ exc_message(mrb_state *mrb, mrb_value exc)
* call-seq:
* call-seq:
* exception.inspect -> string
* 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
static
mrb_value
...
@@ -444,18 +447,18 @@ mrb_init_exception(mrb_state *mrb)
...
@@ -444,18 +447,18 @@ mrb_init_exception(mrb_state *mrb)
{
{
struct
RClass
*
e
;
struct
RClass
*
e
;
mrb
->
eException_class
=
e
=
mrb_define_class
(
mrb
,
"Exception"
,
mrb
->
object_class
);
/* 15.2.22 */
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_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
,
"exception"
,
exc_exception
,
MRB_ARGS_ANY
());
mrb_define_method
(
mrb
,
e
,
"initialize"
,
exc_initialize
,
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
,
"=="
,
exc_equal
,
MRB_ARGS_REQ
(
1
));
mrb_define_method
(
mrb
,
e
,
"to_s"
,
exc_to_s
,
MRB_ARGS_NONE
());
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
,
"message"
,
exc_message
,
MRB_ARGS_NONE
());
mrb_define_method
(
mrb
,
e
,
"inspect"
,
exc_inspect
,
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_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
->
eStandardError_class
=
mrb_define_class
(
mrb
,
"StandardError"
,
mrb
->
eException_class
);
/* 15.2.23 */
mrb_define_class
(
mrb
,
"RuntimeError"
,
mrb
->
eStandardError_class
);
/* 15.2.28 */
mrb_define_class
(
mrb
,
"RuntimeError"
,
mrb
->
eStandardError_class
);
/* 15.2.28 */
e
=
mrb_define_class
(
mrb
,
"ScriptError"
,
mrb
->
eException_class
);
/* 15.2.37 */
e
=
mrb_define_class
(
mrb
,
"ScriptError"
,
mrb
->
eException_class
);
/* 15.2.37 */
mrb_define_class
(
mrb
,
"SyntaxError"
,
e
);
/* 15.2.38 */
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