Re: [Cgi-session-user] errors not displaying
Brought to you by:
sherzodr
From: Randall H. <ra...@ra...> - 2006-07-17 17:21:50
|
On Mon, Jul 10, 2006 at 12:51:26PM -0400, Mark Stosberg wrote: > As you can see from the snippet you posted, CGI::Session is setting the= =20 > error. >=20 > As documented, this error is available through the errstr() method if=20 > you want to see the error. It's the user's responsibility to check this= =20 > error. Thanks for the reply, Mark. Normally I'd agree with you, but the error is occuring in CGI::Session's flush() method, which is called automatically when the object goes out of scope. So unless I call flush() explicitly, I'll never have an opportunity to check for the error. In practice, it means that I either need to create a destructor, or call flush() then check errstr() at every possible exit point for the code. It seems sub-optimal to me that CGI::Sesion says, in effect, "Trust me to call flush() automatically, but I won't promise it will do anything useful." IMHO if flush() is called automatically it should die of its errors, otherwise it isn't trustworthy. r |