You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2012/03/23 14:49:19 UTC

svn commit: r1304346 - /trafficserver/site/trunk/lib/view.pm

Author: amc
Date: Fri Mar 23 13:49:19 2012
New Revision: 1304346

URL: http://svn.apache.org/viewvc?rev=1304346&view=rev
Log:
Fix bad error message in view.pm

Modified:
    trafficserver/site/trunk/lib/view.pm

Modified: trafficserver/site/trunk/lib/view.pm
URL: http://svn.apache.org/viewvc/trafficserver/site/trunk/lib/view.pm?rev=1304346&r1=1304345&r2=1304346&view=diff
==============================================================================
--- trafficserver/site/trunk/lib/view.pm (original)
+++ trafficserver/site/trunk/lib/view.pm Fri Mar 23 13:49:19 2012
@@ -370,7 +370,11 @@ sub _LoadPath {
         # If there's no order file then only one stem is allowed and it
         # is treated as the content for this node.
         my @keys = keys %$stem_map;
-        die "Directories with multiple stems must have an '", view::ORDER_FILE(), "' ordering file at '$path'.\n" unless scalar @keys == 1;
+        if (scalar @keys == 0) {
+            die "No valid stems were found in '$path'.\n"
+        } elsif (scalar @keys > 1) {
+            die "Directories with multiple stems [", join(',', @keys), "] must have an '", view::ORDER_FILE(), "' ordering file at '$path'.\n" unless scalar @keys == 1;
+        }
         my $src = $stem_map->{$keys[0]};
         die "Directories cannot contain only a single nested directory at '$path'.\n" unless ref $src and $src->isa('view::Source');
         $node->copyLangMap($src); # copy over the file mapping.