lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


The thing about exceptions is that I rarely use them, so I never spent
much time thinking about it.. I've seen a number of implementations,
CEGUI seems to be one that supports most cases, but the syntax to bind
them deviates too much from the way exception are defined on a
standard header, which is why I hesitate about merging it into
tolua++..
If there's a way to add them using hooks, I'd love to take a look at
that.. in fact I should probably get all the options together, maybe
on a wiki page, and get opinions from the users to determine which one
to implement..

sorry for not providing a solution on this.. most of the tolua++
development is based on my real world usage of it, so some areas are
lacking (C arrays come to mind)..

Ariel.

On 8/16/07, Olivier Delannoy <olivier.delannoy@gmail.com> wrote:
> In CEGUI (cegui.org.uk) there is a modified version of toLua++ which
> handle exception in a user define behavior specified in the pakage
> file.
>
>
> On 8/16/07, RJP Computing <rjpcomputing@gmail.com> wrote:
> > On 8/16/07, Thomas Breuel <tmbdev@gmail.com> wrote:
> > > We're having the same problem, and I asked about this a few days ago;
> > unfortunately, there has been no official answer from the Lua, tolua, or
> > tolua++ maintainers yet.
> > >
> > > Unless we hear about anybody else working on an official solution soon,
> > we're probably going to start modifying tolua++ (there are some other
> > features we need as well).  I believe all tolua++ needs is to have a couple
> > of hooks added so that the exception handlers can then be implemented as a
> > loadable tolua++ extension (we're using tolua++ because of its improved
> > garbage collection).
> > >
> > > Cheers,
> > > Thomas.
> >
> > Is there any way I can get my hands on this or even help where I can? I was
> > thinking of doing that exact implementation to fix the problem. It seems
> > like a waste of effort. What do you think?
> >
> >  The solution you describe seems to be the cleanest and most universal fix.
> > It allows for the most flexibility. I was also thinking that you need to
> > specify the exception in the .pkg file.
> >
> >  example:
> >  void MyFunction( someParameter ) throws
> >
> >  or maybe:
> >  void MyFunction( someParameter ) throws ExceptionType
> >
> >  I have not even started to look at the design of toLua++ yet so I don't
> > know, if in the second example, the type is even useful. It was just a
> > couple of thoughts.
> > --
> > Regards,
> > Ryan
> > RJP Computing
> >
>
>
> --
> Olivier Delannoy
> ATER
> PRiSM Laboratory
> Versailles University, FRANCE
>