Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 14 lines (13 sloc) 0.429 kb
52a679c Alex MacCaw Add configuration support
authored
1 #include <iostream>
2
3 class RubyUtils
4 {
5 public:
6 static void LogError(){
7 VALUE lasterr = rb_gv_get("$!");
8 VALUE message = rb_obj_as_string(lasterr);
c7a4d04 Alex MacCaw Show error backtrace
authored
9 VALUE array = rb_funcall(lasterr, rb_intern("backtrace"), 0);
10 VALUE backtrace = rb_funcall(array, rb_intern("join"), 1, rb_str_new2("\n\t"));
11 std::cout << "\t" << RSTRING_PTR(message) << std::endl;
12 std::cout << RSTRING_PTR(backtrace) << std::endl;
52a679c Alex MacCaw Add configuration support
authored
13 }
14 };
Something went wrong with that request. Please try again.