$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r79906 - trunk/tools/build/v2/build
From: jurko.gospodnetic_at_[hidden]
Date: 2012-08-07 09:13:42
Author: jurko
Date: 2012-08-07 09:13:41 EDT (Tue, 07 Aug 2012)
New Revision: 79906
URL: http://svn.boost.org/trac/boost/changeset/79906
Log:
Corrected Boost Build's error message displayed when a target id is encountered containing an unresolvable explicit project reference.
Text files modified: 
   trunk/tools/build/v2/build/targets.jam |    32 ++++++++++++++------------------        
   1 files changed, 14 insertions(+), 18 deletions(-)
Modified: trunk/tools/build/v2/build/targets.jam
==============================================================================
--- trunk/tools/build/v2/build/targets.jam	(original)
+++ trunk/tools/build/v2/build/targets.jam	2012-08-07 09:13:41 EDT (Tue, 07 Aug 2012)
@@ -372,11 +372,7 @@
             }
             else
             {
-                # TODO: This extra error message will not get displayed most
-                # likely due to some buggy refactoring. Refactor the code so the
-                # message gets diplayed again.
-                extra-error-message = error: could not find project
-                    '$(project-part)' ;
+                extra-error-message = could not find project '$(project-part)' ;
             }
         }
         else
@@ -417,7 +413,7 @@
             }
         }
 
-        return $(result) ;
+        return $(result:E="") $(extra-error-message) ;
     }
 
     # Find and return the target with the specified id, treated relative to
@@ -428,9 +424,12 @@
     rule find ( id : no-error ? )
     {
         local v = $(.id.$(id)) ;
+        local extra-error-message ;
         if ! $(v)
         {
-            v = [ find-really $(id) ] ;
+            local r = [ find-really $(id) ] ;
+            v = $(r[1]) ;
+            extra-error-message = $(r[2-]) ;
             if ! $(v)
             {
                 v = none ;
@@ -442,18 +441,15 @@
         {
             return $(v) ;
         }
-        else
+        else if ! $(no-error)
         {
-            if ! $(no-error)
-            {
-                local current-location = [ get location ] ;
-                ECHO "error: Unable to find file or target named" ;
-                ECHO "error:     '$(id)'" ;
-                ECHO "error: referred from project at" ;
-                ECHO "error:     '$(current-location)'" ;
-                ECHO $(extra-error-message) ;
-                EXIT ;
-            }
+            local current-location = [ get location ] ;
+            import errors : user-error : errors.user-error ;
+            errors.user-error Unable to find file or target named
+                : "   " '$(id)'
+                : referred from project at
+                : "   " '$(current-location)'
+                : $(extra-error-message) ;
         }
     }