Re: [Cppcms-users] exception from cppcms
Brought to you by:
artyom-beilis
From: 陈抒 <csf...@gm...> - 2011-11-08 13:17:09
|
It only happened one time.I will use 1st point in my log and see if it can happen again. Thanks. 陈抒 Best regards http://blog.csdn.net/sheismylife On Tue, Nov 8, 2011 at 8:54 PM, Artyom Beilis <art...@ya...> wrote: > Two points: > > 1.Add std::cerr<<booster::trace(ex) << std::endl; in the catch statement > so you'll be able to see the stack trace > of the exception where exactly it comes from. (or write it to log > instead of cerr). > 2. Does it happen all the time or once in a while? > > Because this is an exception that is thrown by booster::aio::endpoint > when you try to create it from > an invalid IP address. > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.sf.net/ > CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ > > ------------------------------ > *From:* 陈抒 <csf...@gm...> > *To:* cpp...@li... > *Sent:* Tuesday, November 8, 2011 2:05 PM > *Subject:* Re: [Cppcms-users] exception from cppcms > > Unfortunately,I can't reproduce this case.But I am afraid that the case > occurs in my product environment. > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > > > On Tue, Nov 8, 2011 at 7:48 PM, 陈抒 <csf...@gm...> wrote: > > Hello, > I got the following error log today: > 2011-11-08 10:00:26 GMT; main, error: exception in main,ex:aio::: invalid > endpoint (main.cpp:61) > > My code looks like so: > > int main(int argc,char ** argv){ > // init_log(); > cppcms::json::value config_json; > my_application& app= app_singleton_holder::Instance(); > configuration* config = new configuration(); > > try{ > .... > ..... > cppcms::service srv(argc,argv); > > srv.applications_pool().mount(cppcms::applications_factory<rest::prize_service>()); > srv.run(); > }catch(std::exception const& ex) { > BOOSTER_ERROR("main") << "exception in main,ex:" <<ex.what(); > return 3; > } > } > > I don't know what causes the exception(red above),but it causes my > application to quit. > > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > > > > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |