Commit ce1c6fa7 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixes #4656 Print a clearer error message when an XML error happens

parent ec8e128d
......@@ -732,7 +732,7 @@ sub get_ldap_connexion {
# read ldap's server's info from /etc/fusiondirectory/fusiondirectory.conf
if (-e $fd_config) {
my $twig = XML::Twig->new(); # create the twig
$twig->parsefile($fd_config); # build it
$twig->safe_parsefile($fd_config) or die("There is an error in $fd_config XML code: ".(split /\n/, $@)[1]."\n");
my @locs = $twig->root->first_child('main')->children('location');
my %locations = ();
foreach my $loc (@locs) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment