refactoring ngx_mrb_raise_error functions