Whenever I use CCLights, I may put a value in wrong. The problem is that I need a way to error the current lua thread. It would be great to use IComputerAccess to error the lua thread, but browsing the code yields no results. It would be a great feature for later use by all peripherals.
Is there any way to error the current lua thread within a peripheral?
Started by ds84182, Nov 26 2012 04:52 AM
5 replies to this topic
#1
Posted 26 November 2012 - 04:52 AM
#2
Posted 26 November 2012 - 06:14 AM
throw new Exception("Oh noes, we has error!");
#4
Posted 02 December 2012 - 04:00 PM
Cloudy, on 26 November 2012 - 06:14 AM, said:
throw new Exception("Oh noes, we has error!");
You could queue an error event (hopefully the user would see it).
#5
Posted 02 December 2012 - 09:10 PM
Not if you are within IPeripheral.call(). The lua machine catches the exception and propangates it as lua error.
I you are outside it, (eg in the minecraft update loop), this doesn't work of course, but who would try to launch a lua error from there anyway?
I you are outside it, (eg in the minecraft update loop), this doesn't work of course, but who would try to launch a lua error from there anyway?
#6
Posted 04 December 2012 - 06:54 AM
bbqroast, on 02 December 2012 - 04:00 PM, said:
Cloudy, on 26 November 2012 - 06:14 AM, said:
throw new Exception("Oh noes, we has error!");
You could queue an error event (hopefully the user would see it).
I wouldn't have suggested it had that been the case.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











