From aa293d9465d496602d4e752113f46d89d5a7fe8c Mon Sep 17 00:00:00 2001 From: pierre Date: Fri, 29 Jan 2016 07:43:25 +0000 Subject: [PATCH] Fix last commit by raise Compilation failure again in finally block in CompileBuildUnit procedure git-svn-id: trunk@33017 - --- packages/fpmkunit/src/fpmkunit.pp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/fpmkunit/src/fpmkunit.pp b/packages/fpmkunit/src/fpmkunit.pp index 424b8b69bf..fd4e2bf649 100644 --- a/packages/fpmkunit/src/fpmkunit.pp +++ b/packages/fpmkunit/src/fpmkunit.pp @@ -1567,6 +1567,7 @@ ResourceString SErrPackVarNotExist = 'There is no package variant with the name "%s"'; SErrEventNotSupported = 'Unsupported event type'; SErrorPkgNotInstalled = 'Package "%s" is not installed, can not uninstall.'; + SErrBuildUnitCompilation = 'Compilation of "%s" failed'; SWarnCircularTargetDependency = 'Warning: Circular dependency detected when compiling target %s with target %s'; SWarnCircularPackageDependency = 'Warning: Circular dependency detected when compiling package %s with package %s'; @@ -1647,6 +1648,7 @@ ResourceString SDbgDirectoryDoesNotExist = 'Directory "%s" does not exist'; SDbgDirectoryNotEmpty = 'Directory "%s" is not empty. Will not remove'; SDbgGenerateBuildUnit = 'Generate build-unit %s'; + SDbgBuildUnitFailure = 'Generate build-unit %s failed'; SDbgForcedCompile = 'Forced compile'; SDbgOutputDoesNotExist = 'Output file does not exist'; SDbgNewerSource = 'Source file is newer then output file'; @@ -6733,7 +6735,11 @@ Var end; finally if CompilationFailed then - Log(vlDebug,APackage.FBUTarget.FTargetSourceFileName) + begin + Log(vlDebug,Format(SDbgBuildUnitFailure,[APackage.FBUTarget.FTargetSourceFileName])); + // Raise failure exception again. + Error(SErrBuildUnitCompilation,[APackage.FBUTarget.FTargetSourceFileName]); + end else begin // Delete temporary build-unit files