Sure. Kjetil
On Sep 30, 11:46 am, Derek Chen-Becker <[email protected]> wrote: > Can you open a ticket on this? Lift uses reflection to locate the methods > unless you're using a DispatchSnippet (the preferred way to do it), so we > can probably enumerate all methods on the class and see if there is a method > with the same name but different args or return types when we fail to locate > something. > > Derek > > On Tue, Sep 29, 2009 at 7:03 AM, Kjetil Valstadsve > <[email protected]>wrote: > > > > > > > Hi, I know I just raved about #liftweb error reporting on Twitter, > > but... now that I found out what was wrong, I still have a gripe about > > it. I am very unforgiving on error reporting logic, but most of the > > time people's error handling is so hopeless that I just throw up my > > arms and emit some mock Italian. When I bother to post this complaint, > > it's because I think lift is doing great and I want to help improve > > it. > > > The case occurs when a <lift:Foo.bar> tag fails to match the bar > > method in Foo. The rendered red box (which is very nice) tells me that > > the method was not found. However, it would be very handy if it > > handled the special case of "method found but the signature is wrong". > > As it is, I got the same message when I definitely had the method, per > > se. Before I knew it, I was on a quest to find the outdated class > > file, rebuilding here and there to make sure I had the war file in > > synch with my code. > > > In my case, I hadn't specified the return type, and I was mistakenly > > using foreach instead of flatMap inside the method, implicitly giving > > Unit as return type. So lift was completely right, the method could > > not be found. However, this is siding with the compiler against the > > human, if you know what I mean. Also, since you cannot overload a > > method by varying only the return type, it is a pretty safe assumption > > that the mis-typed method is the one the user meant to use, especially > > if it takes the correct argument list, too. > > > Kjetil --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
