Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Lua Development Tools » Stop the code on error(How do I stop the code and perform a custom function, when an error occurs)
Stop the code on error [message #901486] Mon, 13 August 2012 05:20 Go to next message
Anthony Liew is currently offline Anthony LiewFriend
Messages: 2
Registered: August 2012
Junior Member
Hi guys,

I just want to know one thing.

How do I make it so that when an error occurs when debugging with Koneki, how do I pause execution and perform a custom function?


Is there something I need to change in debugger.lua or debuginstospection.lua?

Please reply at your earliest convenience, this issue has been plaguing my development time, and I'm really desperate.

Thanks in advance

[Updated on: Mon, 13 August 2012 05:22]

Report message to a moderator

Re: Stop the code on error [message #902495 is a reply to message #901486] Fri, 17 August 2012 22:46 Go to previous messageGo to next message
Benjamin Cabé is currently offline Benjamin CabéFriend
Messages: 201
Registered: July 2009
Location: Toulouse, France
Senior Member

Hi Anthony,

Not sure I get your question :/ What do you mean by "when an error occurs when debugging with Koneki"?

Thanks for taking time to clarifying, hopefully I can help you then!
Benjamin


Re: Stop the code on error [message #903863 is a reply to message #902495] Sun, 26 August 2012 20:14 Go to previous messageGo to next message
Benedikt Roland is currently offline Benedikt RolandFriend
Messages: 6
Registered: August 2012
Junior Member
I think he wants to perform that custom function when he is debugging in the eclipse-distribution "Koneki". So: he want to run some javacode when the debugger notes an lua-related error. (Am I right?)
Re: Stop the code on error [message #904857 is a reply to message #903863] Wed, 29 August 2012 09:31 Go to previous messageGo to next message
Marc Aubry is currently offline Marc AubryFriend
Messages: 86
Registered: August 2012
Member
Anthony, Benedikt,

I am not sure to understand fully your needs but here some points:


  1. Currently the debugger is not able to launch custom java code, and I don't understand the goal to run Java code on error instead of lua code. Maybe you can explain what have to do the code you want to run.
  2. Currently the debugger is not able to stop on error as the Java debugger can stop on exception. But it's will be a nice feature I think, so I have created this bug as a feature request: https://bugs.eclipse.org/bugs/show_bug.cgi?id=388301
    Feel free to discuss about this feature by commenting the bug.
  3. To execute some code when errors occurs in lua, use pcall as explained here:
    www.lua.org/pil/8.4.html


Regards,
Marc
Re: Stop the code on error [message #904914 is a reply to message #904857] Wed, 29 August 2012 11:21 Go to previous message
Benedikt Roland is currently offline Benedikt RolandFriend
Messages: 6
Registered: August 2012
Junior Member
I just thought he would work around with the debugging-perspective.
I also develop Python and Java stuff. You can run a little bit of java when in python an error occurs (so it pauses and did not stop/exit). it runs python-code, but on an error you can Java-code(I am talking of plugin-code). I thought he meant that, but maybe ... he meant something other...
Previous Topic:Code Assistant doesn't work with networked sources?
Next Topic:Code Formatter, Code Assistance and Outline do not work
Goto Forum:
  


Current Time: Thu Apr 25 14:38:06 GMT 2024

Powered by FUDForum. Page generated in 0.03406 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top