Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. diff --git a/src/script/lua_api/l_craft.cpp b/src/script/lua_api/l_craft.cpp
  2. index b0a47bf..a8bb745 100644
  3. --- a/src/script/lua_api/l_craft.cpp
  4. +++ b/src/script/lua_api/l_craft.cpp
  5. @@ -130,6 +130,13 @@ bool ModApiCraft::readCraftReplacements(lua_State *L, int index,
  6. }
  7. return true;
  8. }
  9. +class FooException : public std::exception
  10. +{
  11. + virtual const char * what() const throw()
  12. + {
  13. + return "FooException what() text";
  14. + }
  15. +};
  16. // register_craft({output=item, recipe={{item00,item10},{item01,item11}})
  17. int ModApiCraft::l_register_craft(lua_State *L)
  18. {
  19. @@ -137,6 +144,7 @@ int ModApiCraft::l_register_craft(lua_State *L)
  20. //infostream<<"register_craft"<<std::endl;
  21. luaL_checktype(L, 1, LUA_TTABLE);
  22. int table = 1;
  23. + throw FooException();
  24.  
  25. // Get the writable craft definition manager from the server
  26. IWritableCraftDefManager *craftdef =
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement