Browse Source

gestion d'erreur

Sniperovitch 8 years ago
parent
commit
b2ba2f08b3
1 changed files with 3 additions and 3 deletions
  1. 3 3
      lib/Bartender.pm

+ 3 - 3
lib/Bartender.pm

@@ -12,13 +12,13 @@ get '/shake' => sub {
     my $opt_base   = $param{projetPadPrincipal};
     my $opt_garde  = $param{projetPadGarde};
     my $opt_projet = $param{projetId};
-    my $cocktail = config->{cocktail}{binary};
+    my $cocktail   = config->{cocktail}{binary};
     if(not defined $cocktail) {
-        my $error->{message} = "cocktail:binary n'est pas configuré dans config.yml";
+        my $error->{message} = qq{"cocktail:binary" n'est pas configuré dans config.yml};
         return template 'error', $error;
     }
     elsif(not -x $cocktail) {
-        my $error->{message} = "cocktail$cocktail n'est pas executable";
+        my $error->{message} = qq{cocktail: "$cocktail" n'est pas executable};
         return template 'error', $error;
     }
     system("$cocktail -d $opt_dossier -b '$opt_base' -g '$opt_garde' -p $opt_projet &");