mirror of
https://github.com/boostorg/build.git
synced 2026-02-17 13:42:14 +00:00
Better error reporting
[SVN r16208]
This commit is contained in:
@@ -21,7 +21,7 @@ import errors : error ;
|
||||
import project-root ;
|
||||
import print ;
|
||||
import class : class new ;
|
||||
|
||||
import errors ;
|
||||
|
||||
#
|
||||
# Loads jamfile at the given location. After loading, project global
|
||||
@@ -219,10 +219,9 @@ rule find-target ( id : current-location )
|
||||
}
|
||||
else if $(explicit)
|
||||
{
|
||||
print.wrapped-text
|
||||
errors.error
|
||||
"The target id" $(id) ",specified by project at" $(current-location)
|
||||
"is invalid (missing 'use-project'?)" ;
|
||||
EXIT ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -420,12 +419,10 @@ rule project-attributes ( location )
|
||||
|
||||
if $(result[1]) = "@error"
|
||||
{
|
||||
print.wrapped-text
|
||||
errors.error
|
||||
"Requirements for project at '$(self.location)'"
|
||||
"conflict with parent's." ;
|
||||
print.wrapped-text
|
||||
"conflict with parent's." :
|
||||
"Explanation: " $(result[2-]) ;
|
||||
EXIT ;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -449,9 +446,8 @@ rule project-attributes ( location )
|
||||
else if ! $(attribute) in "id" "default-build" "location" "source-location"
|
||||
"project-root" "project-root-module" "parent" "projects-to-build"
|
||||
{
|
||||
print.wrapped-text "Invalid project attribute '$(attribute)' specified "
|
||||
errors.error "Invalid project attribute '$(attribute)' specified "
|
||||
"for project at '$(self.location)'" ;
|
||||
EXIT ;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
# warranty, and with no claim as to its suitability for any purpose.
|
||||
|
||||
import class : is-instance ;
|
||||
import errors ;
|
||||
|
||||
rule ungrist ( names * )
|
||||
{
|
||||
@@ -13,8 +14,7 @@ rule ungrist ( names * )
|
||||
local stripped = [ MATCH ^<(.*)>$ : $(name) ] ;
|
||||
if ! $(stripped)
|
||||
{
|
||||
ECHO *** error: in ungrist $(names) ;
|
||||
EXIT *** $(name) is not of the form <.*> ;
|
||||
errors.error "in ungrist" $(names) : $(name) is not of the form <.*> ;
|
||||
}
|
||||
result += $(stripped) ;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ import errors : error ;
|
||||
import project-root ;
|
||||
import print ;
|
||||
import class : class new ;
|
||||
|
||||
import errors ;
|
||||
|
||||
#
|
||||
# Loads jamfile at the given location. After loading, project global
|
||||
@@ -219,10 +219,9 @@ rule find-target ( id : current-location )
|
||||
}
|
||||
else if $(explicit)
|
||||
{
|
||||
print.wrapped-text
|
||||
errors.error
|
||||
"The target id" $(id) ",specified by project at" $(current-location)
|
||||
"is invalid (missing 'use-project'?)" ;
|
||||
EXIT ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -420,12 +419,10 @@ rule project-attributes ( location )
|
||||
|
||||
if $(result[1]) = "@error"
|
||||
{
|
||||
print.wrapped-text
|
||||
errors.error
|
||||
"Requirements for project at '$(self.location)'"
|
||||
"conflict with parent's." ;
|
||||
print.wrapped-text
|
||||
"conflict with parent's." :
|
||||
"Explanation: " $(result[2-]) ;
|
||||
EXIT ;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -449,9 +446,8 @@ rule project-attributes ( location )
|
||||
else if ! $(attribute) in "id" "default-build" "location" "source-location"
|
||||
"project-root" "project-root-module" "parent" "projects-to-build"
|
||||
{
|
||||
print.wrapped-text "Invalid project attribute '$(attribute)' specified "
|
||||
errors.error "Invalid project attribute '$(attribute)' specified "
|
||||
"for project at '$(self.location)'" ;
|
||||
EXIT ;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
# warranty, and with no claim as to its suitability for any purpose.
|
||||
|
||||
import class : is-instance ;
|
||||
import errors ;
|
||||
|
||||
rule ungrist ( names * )
|
||||
{
|
||||
@@ -13,8 +14,7 @@ rule ungrist ( names * )
|
||||
local stripped = [ MATCH ^<(.*)>$ : $(name) ] ;
|
||||
if ! $(stripped)
|
||||
{
|
||||
ECHO *** error: in ungrist $(names) ;
|
||||
EXIT *** $(name) is not of the form <.*> ;
|
||||
errors.error "in ungrist" $(names) : $(name) is not of the form <.*> ;
|
||||
}
|
||||
result += $(stripped) ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user