Skip to content

Catch exceptions while initializing.#808

Closed
mattn wants to merge 4 commits into
mruby:masterfrom
mattn:catch_initerror
Closed

Catch exceptions while initializing.#808
mattn wants to merge 4 commits into
mruby:masterfrom
mattn:catch_initerror

Conversation

@mattn

@mattn mattn commented Feb 1, 2013

Copy link
Copy Markdown
Contributor

If exception occur while initializing mrbgems, mruby call abort().
I think it should be bits gracefull.

How about show errors and return NULL for mrb_open() ?

@mattn

mattn commented Feb 1, 2013

Copy link
Copy Markdown
Contributor Author

Hmm, it seems test is failing. This is catch-up logic for initialize. When going to vm loop, this part should be overwrite the next setjmp, I guess. hmm...

@mattn

mattn commented Feb 1, 2013

Copy link
Copy Markdown
Contributor Author

Ah, mrb->jmp must be clear..

@takahashim

Copy link
Copy Markdown
Contributor

mrb_p can not be used when #define DISABLE_STDIO, so we should not use it in fundamental code like src/state.c, IMHO.

@mattn

mattn commented Feb 1, 2013

Copy link
Copy Markdown
Contributor Author

Added #ifdef, Thank you.

@takahashim

Copy link
Copy Markdown
Contributor

😃

@mattn

mattn commented Feb 8, 2013

Copy link
Copy Markdown
Contributor Author

@matz abort() makes us confused to debug.

@monaka

monaka commented Mar 29, 2013

Copy link
Copy Markdown
Contributor

How about fixing it by #1096 ?

@mattn

mattn commented Mar 31, 2013

Copy link
Copy Markdown
Contributor Author

I wonder we will detect error description with mrb_panic. mrb_bug have argument for description.

@matz

matz commented Oct 27, 2021

Copy link
Copy Markdown
Member

Fixed by #4250

@matz matz closed this Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants