From: Lee G. <LGo...@UK...> - 2007-06-29 09:58:59
|
Mike Schilli [mailto:m...@pe...] wrote: >=20 > On Thu, 28 Jun 2007, Lee Goddard wrote: >=20 > > Please could Log/Log4perl/Config.pm line 619 offer a stack backtrace as > > well as barfing? > > > > My current project has four config files, several potential initialisers > > (bad idea, I know) and reports only via e-mail, since it is part of a > > MTA process. >=20 > Dumping a stack trace by default might be confusing to the casual L4p > user, but you can certainly use the following: >=20 > use Log::Log4perl; > use Carp; >=20 > eval { > Log::Log4perl->init(...); > }; >=20 > if($@) { > confess($@); > } >=20 > Would this work for you? That's what I've ended up with, but I just thought it logical that an error generated by an operator error, such as wrong path to a config file, would Carp::croak, to let the user know from whence their error came.... Lee |