Hi,

I don't know why debug.traceback() is returning an incomplete stack.

But notice that _ERRORMESSAGE receive two parameters, first is msg and
second is already the full traceback.

I suggest you to take a look at the IUP source code in
iup/srclua5/iuplua.lua and iuplua.c.

Best,
Scuri
Em 26/12/2013 13:30, "Victor Bombi" <[email protected]> escreveu:

> Hello,
> I have an application to in which I can debug lua scripts.
> In order to  avoid iup error dialog I have defined
>
> iup._ERRORMESSAGE=function(msg,...)
>  print(msg,...);
>  print"xxxxxxxxxxxxxxxxxxxxxxxxx";
>  print(debug.traceback());
>  print"xxxxxxxxxxxxxxxxxxxxxxxxx";
>  error(msg,0)
> end
>
> where I call error to pass the error to my debugger.
> both tracebacks are not equivalent and the most important level is lost:
>  [C]: in function 'Light'
>  C:\LUA\lua2sc\iupluasamples\cube.lua:133: in function
> <C:\LUA\lua2sc\iupluasamples\cube.lua:130>
>
> this is the output:
>
> C:\LUA\lua2sc\iupluasamples\cube.lua:133: bad argument #3 to 'Light'
> (number
> expected, got nil)
> stack traceback:
>  [C]: in function 'Light'
>  C:\LUA\lua2sc\iupluasamples\cube.lua:133: in function
> <C:\LUA\lua2sc\iupluasamples\cube.lua:130>
>  (tail call): ?
>  [C]: in function 'Show'
>  [string "iuplua.lua"]:200: in function 'show'
>  C:\LUA\lua2sc\iupluasamples\cube.lua:153: in function 'fs'
>  C:\LUA\lua2sc\lua\ide\scriptrun.lua:437: in function
> <C:\LUA\lua2sc\lua\ide\scriptrun.lua:380>
>  (tail call): ?
>  [C]: in function 'xpcall'
>  C:\LUA\lua2sc\lua\ide\scriptrun.lua:532: in function
> <C:\LUA\lua2sc\lua\ide\scriptrun.lua:526>
> xxxxxxxxxxxxxxxxxxxxxxxxx
> stack traceback:
>  C:\LUA\lua2sc\iupluasamples\cube.lua:126: in function
> <C:\LUA\lua2sc\iupluasamples\cube.lua:123>
>  [C]: in function 'Show'
>  [string "iuplua.lua"]:200: in function 'show'
>  C:\LUA\lua2sc\iupluasamples\cube.lua:153: in function 'fs'
>  C:\LUA\lua2sc\lua\ide\scriptrun.lua:437: in function
> <C:\LUA\lua2sc\lua\ide\scriptrun.lua:380>
>  (tail call): ?
>  [C]: in function 'xpcall'
>  C:\LUA\lua2sc\lua\ide\scriptrun.lua:532: in function
> <C:\LUA\lua2sc\lua\ide\scriptrun.lua:526>
> xxxxxxxxxxxxxxxxxxxxxxxxx
>
> How could I get all stack?
>
> Best
> victor bombi
>
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Iup-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/iup-users
>
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to