Hello!
First of all, thanks for the new release! Nice to see this :) I downloaded
the newest version, included the wxmsw28_vc_custom.dll in my application,
everything works well. But. I checked wxlua.wxLUA_VERSION_STRING and
wx.wxVERSION_STRING, I got 2.8.7.0 and 2.8.7. They aren't updated?
About error reporting: Use xpcall(), and it will catch every error, that's
how I do now:
function OnError(errorstr)
local file = io.open("./exceptioninfo.txt","a+")
if file then
local tUptime = os.date("*t",os.clock())
file:write("System informations: \n"..
" Time: "..os.date("%x %X").."\n"..
" OS: "..wx.wxGetOsDescription().."\n"..
" Free memory: "..(tFuncs and
tFuncs:ConvertShare(wx.wxGetFreeMemory():ToDouble()) or
(wx.wxGetFreeMemory():ToDouble().." B")).."\n"..
" Startup path: "..wx.wxGetCwd().."\n"..
" Resolution:
"..wx.wxGetDisplaySize():GetWidth().."x"..wx.wxGetDisplaySize():GetHeight().."\n"..
" Uptime: "..string.format("%i hour(s) %i minute(s) %i
second(s)",tUptime.hour,tUptime.min, tUptime.sec).."\n"..
" Program version: ".._APPVER.."\n"..
" LUA version: ".._VERSION.."\n"..
" wxWidgets version: "..wx.wxVERSION_STRING.."\n"..
" wxLUA version: "..wxlua.wxLUA_VERSION_STRING.."\n"..
string.rep("=",60).."\nError message
description:\n"..tostring(errorstr).."\n"..
debug.traceback().."\n")
file:write(string.rep("=",60).."\n")
file:close()
wx.wxMessageBox("An error occured in the application, some
information about it has been generated. \n"..
"Please send the exceptioninfo.txt file to: [email protected]
","ERROR",wx.wxICON_ERROR)
else
wx.wxMessageBox("An error occured in the application, but the
program can't write into the debug file. \n"..
"Hence, I can't find out why it crashed, so don't report this as a
bug unless you find a solution...","ERROR",wx.wxICON_ERROR)
end
tCtrls["app"]:Destroy()
wx.wxGetApp():ExitMainLoop()
wx.wxExit(0)
end
and main function is called by xpcall(main,OnError)
Hope this helps.. :)
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
_______________________________________________
wxlua-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxlua-users