|
2 registered members (TedMar, AndrewAMD),
1,344
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
on_error event / callback?
#309565
02/10/10 01:18
02/10/10 01:18
|
Joined: Nov 2007
Posts: 1,143 United Kingdom
DJBMASTER
OP
Serious User
|
OP
Serious User
Joined: Nov 2007
Posts: 1,143
United Kingdom
|
Hi is it possible to add an event like 'on_error' that allows us to execute a function when an error occurs. I could really use this for my scripting app.
Preferably parameters such as 'line_number' and 'current_module' would be passed to the function. By 'current_module' I mean the object/function that the error occured in.
If there was a way to hook this up when compiling a script too that would be awesome. Right now 'ackerr.txt' only prints the first error it finds.
Last edited by DJBMASTER; 02/10/10 01:50.
|
|
|
Re: on_error event / callback?
[Re: jcl]
#310734
02/16/10 18:48
02/16/10 18:48
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Why is it a low cost-benefit ratio?
I am regularly annoyed that lite-c has no capability of "trapping" errors.
The amount of duplicated code needed to "dodge" errors could be greatly reduced with a simple "on_error" event in the engine.
Being able to trap and handle errors with our own code should IMHO be manditory.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: on_error event / callback?
[Re: EvilSOB]
#310762
02/16/10 20:27
02/16/10 20:27
|
Joined: Sep 2003
Posts: 9,859
FBL
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 9,859
|
|
|
|
|
|
|