Re: error/exception hadling in luabind
"Domino" <[email protected]>
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <000001c9a1a6$cc8dfbf0$65a9f3d0$@fm> |
Thanks, I thought that luabind takes the error message from the lua stack. -----Original Message----- From: Daniel Wallin [mailto:[email protected]] Sent: Tuesday, March 10, 2009 11:36 AM To: [email protected] Subject: Re: [luabind] error/exception hadling in luabind Domino wrote: > Hello, > > My question is how to handle errors that tells something more than "lua > runtime error". In my code I need multiple scripts for the single lua state > that shouldn't know about each other so I'm using lua code to load the > scripts (the code comes from this list by the way). Below is the example of > the code that I have problem with: When you catch "luabind::error", the Lua error message will be at the top of the stack. So you can do lua_tostring(L, -1) to get the error message. HTH, -- Daniel Wallin BoostPro Computing http://www.boostpro.com ---------------------------------------------------------------------------- -- _______________________________________________ luabind-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/luabind-user ---------------------------------------------------------------------- Program tylko dla graczy komputerowych! Ogladaj >>> http://link.interia.pl/f207f ------------------------------------------------------------------------------