Re: Greetings again all
- Posted by jbrown105 at speedymail.org Aug 10, 2002
- 462 views
On 0, Matthew Lewis <matthewwalkerlewis at YAHOO.COM> wrote: > > -----Original Message----- > > From: draegur at earthlink.net [mailto:draegur at earthlink.net] > > > The only problem I still have with euphoria is the lack of error > > trapping. One little coding error and down goes my game. Has there, by > > any chance, been any developments in this area? Is it possible now in > > euphoria to trap the errors somehow and avoid the crashes? > > There are some libs that work with exceptions of some sort. Yes, but those are mostly for user-defined exceptions. There is no way to catch a builtin run-time exception except for checking the conditions/parameters etc. in advance. Another hack I attempted was to modify David Cuny and Delroy Gayle's euphoria interpreter written in euphoria code to add this support. However, ignoring the bugs already contained in the simulated interpreter, this is very slow and kludgy. (One plus of this would be hacking the eu coded interpreter to be an include file rather than a stand-alone program. Then scripting, such as exec("a = b + c"), would become more feasible. > Also, my > modified interpreter could help you. You can specify a crash routine. You > can also get a dump of the symbol table, allowing you to possibly recover > the program state after an error. You might be able to dump vars, start a > new instance of the mud, and allow it to recover from there. Of course, I > suppose you'd have to reestablish connections and so forth (but I'm sure you > know a lot more about that end of it than I do)... > This would be a much better idea than using a simulated interpeter. > Oh, and it would also need to be recompiled for linux (I could only get > Borland to work for me), which I don't have. If anyone is willing, I'd be > happy to share my modifications for you to recompile under linux/dos > (assuming you've registered the source code already, of course :). > I would love to try out your modified interpreter, but I can not because of this restriction. (I use linux and do not that the source code.) > Matt Lewis > Linux User:190064 Linux Machine:84163 -- http://fastmail.fm -- Does exactly what it says on the tin