Commit 88a11d81 authored by dearblue's avatar dearblue

Improves out of memory messages for `eval`

The comment says that if `mrb_parse_nstring()` returns `NULL`, it is only out of memory.
I'm worried about compatibility if I set the exception class to `NoMemoryError`, so it's still `RuntimeError`.
parent 825c14a0
......@@ -39,7 +39,7 @@ create_proc_from_string(mrb_state *mrb, const char *s, mrb_int len, mrb_value bi
/* only occur when memory ran out */
if (!p) {
mrb_raise(mrb, E_RUNTIME_ERROR, "Failed to create parser state.");
mrb_raise(mrb, E_RUNTIME_ERROR, "Failed to create parser state (out of memory)");
}
if (0 < p->nerr) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment