Improve error message when cli fails to save (#2223)

Moo
Maxime Besson 5 years ago
parent 4c21e1cb53
commit c5c9d581cb
  1. 3
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Cli.pm

@ -343,9 +343,10 @@ sub _save {
} }
else { else {
$self->logger->error("CLI: Configuration not saved!"); $self->logger->error("CLI: Configuration not saved!");
printf STDERR "Could not save configuration:";
printf STDERR $Lemonldap::NG::Common::Conf::msg;
printf STDERR "Modifications rejected: %s:\n", $parser->{message} printf STDERR "Modifications rejected: %s:\n", $parser->{message}
if $parser->{message}; if $parser->{message};
print STDERR Dumper($parser);
} }
foreach (qw(errors warnings status)) { foreach (qw(errors warnings status)) {
if ( $parser->{$_} and @{ $parser->{$_} } ) { if ( $parser->{$_} and @{ $parser->{$_} } ) {

Loading…
Cancel
Save