More readable error

environments/ppa-mbqj77/deployments/1
Xavier Guimard 10 years ago
parent 376f69d47a
commit 6399846bee
  1. 11
      lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI.pm

@ -12,14 +12,17 @@ has protection => ( is => 'rw', isa => 'Str' );
around init => sub {
my ( $method, $self, $args ) = @_;
eval { Lemonldap::NG::Handler::SharedConf->init($self) };
if($@ and not $self->{protection} eq 'none') {
$self->lmLog($@,'error');
if ( $@ and not $self->{protection} eq 'none' ) {
$self->lmLog( $@, 'error' );
$self->error($@);
$self->$method($args);
return 0;
}
unless(Lemonldap::NG::Handler::SharedConf->checkConf($self) or $self->{protection} eq 'none') {
$self->error($Lemonldap::NG::Common::Conf::msg);
unless ( Lemonldap::NG::Handler::SharedConf->checkConf($self)
or $self->{protection} eq 'none' )
{
$self->error(
"Unable to protect this app ($Lemonldap::NG::Common::Conf::msg)");
$self->$method($args);
return 0;
}

Loading…
Cancel
Save