Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
CometActor hides errors that are part of construction. #1642
As per the discussion at https://groups.google.com/forum/#!topic/liftweb/Ed2MfRUYlaM it has been found that if there is an exception/error as part of CometActor initialization an obscure NoSuchMethodError is instead given which hides the actual cause of the problem.
Some extra/accurate debugging information would go a long way towards reducing pain.
Ok, so this will require a little more elbow grease than some of the other easy tasks, but it should also be fairly straightforward.
The problem here is at https://github.com/lift/framework/blob/master/web/webkit/src/main/scala/net/liftweb/http/LiftSession.scala#L2589 and https://github.com/lift/framework/blob/master/web/webkit/src/main/scala/net/liftweb/http/LiftSession.scala#L2600 . There, we invoke
In fact, if the constructor doesn't exist I think we would get a
Things needed here:
We'll need some trial and error here to devise what our preferred behaviors are in various scenarios, but all the scenarios are pretty easy (constructors exist and work, constructors don't exist, constructors exist and throw exceptions) to go through.
Well I just got bit by this error pretty hard while working on the Judicial Manager code.
I had an NPE in my comet constructor (werps) and it gave me a constructor error. Did some testing in the REPL for fun... it looks like the reflection code does throw a proper
There's no wrapping of underlying exceptions that occur from what I can tell.
I think this is as simple as changing this line to only evaluate
Are the places where I occationally run into these NPEs, as mentioned:
But, only in dev-mode. Have you gotten these in prod-mode?