HTTPProvider.bootlift catch UnavailableException / errors but should not

11 views
Skip to first unread message

Francois

unread,
Apr 25, 2017, 8:18:17 AM4/25/17
to Lift
Hello,

The HTTPProvider.bootLift method is catching
javax.servlet.UnavailableException, which it should not because the
exception is here to tell the application server that the servlet failed
to boot.

In Lift 2.6.x, it was even worse because the method was catching ALL
exception, even Errors.

Should I open a ticket for that?

Thanks,

--
Francois ARMAND - @fanf42
https://github.com/Normation/rudder
http://www.normation.com

Antonio Salazar Cardozo

unread,
Apr 25, 2017, 1:38:57 PM4/25/17
to Lift
Seems like a fair thing to open an issue for. In what cases would that exception
be thrown? That should help us test it and such.

Even better if you can spin up a quick example project to go with the issue :)
Thanks,
Antonio

Francois

unread,
Apr 26, 2017, 6:00:37 AM4/26/17
to lif...@googlegroups.com

I'm doing a lot of initialization and resource availability checking at bootstrap, and it was natural to put them in Lift boot() method. The UnavailableException was a conventional way to tell the web-app server that something went horribly wrong during init.

For now, I added a ServletContextListener where I'm doing the init and throw UnavailableException, but it somehow split the init logic between it and Lift boot().

I've opened a ticket to trace that here: https://github.com/lift/framework/issues/1843

Thanks,
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matt Farmer

unread,
Apr 26, 2017, 9:32:47 AM4/26/17
to lif...@googlegroups.com
Excellent, thanks for filing an issue here.

Curious: What's the correct behavior here? Should we re-throw all exceptions we catch with that message? Or should we only re-throw Unavailable exception?

I suppose we could also make what exceptions we re-throw configurable somehow.

Thoughts?
Reply all
Reply to author
Forward
0 new messages