I'm getting started with mruby and found out the hard way that an error was occurring in my code, but there was no error reporting. Maybe I am doing something wrong. How can I get errors to appear when they occur?
Excerpt from C code:
mrb = mrb_open();
FILE *f = fopen("example.rb", "r");
mrb_load_file(mrb, f);
fclose(f);
// more C code...
Ruby code which fails without reporting:
# example.rb
def my_method
call_undefined_method
end
my_method()
Ruby code which rescues from the error to display that there was an error:
# example.rb
def my_method
call_undefined_method
rescue => e
puts "Error: #{e.message}"
end
my_method()