From: George Nash Date: Tue, 20 Jun 2017 21:39:07 +0000 (-0700) Subject: build: Replace SCons.Error with exit message X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aeb331bd37ad70cfdada3393f039ab80ffbc036e;p=platform%2Fupstream%2Fiotivity.git build: Replace SCons.Error with exit message The build would crash if JAVA_HOME was not specified because SCons.Error was not imported into the script. This replaces the error with an exit message. Change-Id: Ic950ae3dc0d0c3308d7bbd90ab965b17f4563f0f Signed-off-by: George Nash Bug: https://jira.iotivity.org/browse/IOT-1745 Reviewed-on: https://gerrit.iotivity.org/gerrit/20947 Reviewed-by: Phil Coval Tested-by: jenkins-iotivity (cherry picked from commit 369d43b707cabcf715f50ff4827670196c4f425f) Reviewed-on: https://gerrit.iotivity.org/gerrit/21159 Reviewed-by: Mats Wichmann --- diff --git a/build_common/external_libs.scons b/build_common/external_libs.scons index 659f844..f9e61d5 100644 --- a/build_common/external_libs.scons +++ b/build_common/external_libs.scons @@ -35,8 +35,8 @@ if env.get('BUILD_JAVA') == True and target_os != 'android': env.get('JAVA_HOME') + '/include/' + target_os ]) else: - raise SCons.Errors.StopError( - 'BUILD_JAVA is specified, but JAVA_HOME is not set.') + msg = "Error: BUILD_JAVA requires JAVA_HOME to be set for target '%s'" % target_os + Exit(msg) # External library include files are in /deps//include # the library binaries are in /deps//lib/