diff --git a/new/project.jam b/new/project.jam index d4fddd7f7..f927149dd 100644 --- a/new/project.jam +++ b/new/project.jam @@ -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 { diff --git a/new/utility.jam b/new/utility.jam index 8d2150c5f..1230b1d84 100644 --- a/new/utility.jam +++ b/new/utility.jam @@ -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) ; } diff --git a/v2/build/project.jam b/v2/build/project.jam index d4fddd7f7..f927149dd 100644 --- a/v2/build/project.jam +++ b/v2/build/project.jam @@ -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 { diff --git a/v2/util/utility.jam b/v2/util/utility.jam index 8d2150c5f..1230b1d84 100644 --- a/v2/util/utility.jam +++ b/v2/util/utility.jam @@ -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) ; }