Sha256: 557c9e3368eebaa58ffe9c614609ea4c2b643ebae1a329d47428d1265f53ddfc

Contents?: true

Size: 450 Bytes

Versions: 6

Compression:

Stored size: 450 Bytes

Contents

<%= comment(@function) %>
<%= signature(@function) %> {
  try {
<%= indent(body(@function), 4) %>
  } catch (std::exception &e) {
    std::string *s = new std::string("<%= @function.id_name %>: ");
    s->append(e.what());
    lua_pushstring(L, s->c_str());
    delete s;
    lua_error(L);
    // never reached
    return 0;
  } catch (...) {
    lua_pushstring(L, "<%= @function.id_name %>: Unknown exception");
    lua_error(L);
    return 0;
  }
}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dub-0.6.6 lib/dub/lua/function.cpp.erb
dub-0.6.5 lib/dub/lua/function.cpp.erb
dub-0.6.4 lib/dub/lua/function.cpp.erb
dub-0.6.3 lib/dub/lua/function.cpp.erb
dub-0.6.2 lib/dub/lua/function.cpp.erb
dub-0.6.1 lib/dub/lua/function.cpp.erb