From f5359171490a6d68193e02addaee30650b517051 Mon Sep 17 00:00:00 2001 From: Manuel Fuchs Date: Tue, 3 Dec 2024 15:47:59 +0100 Subject: [PATCH] Add error message for system.properties parse errors --- buildpacks/jvm/src/errors.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/buildpacks/jvm/src/errors.rs b/buildpacks/jvm/src/errors.rs index 8903327a..5359650f 100644 --- a/buildpacks/jvm/src/errors.rs +++ b/buildpacks/jvm/src/errors.rs @@ -123,7 +123,7 @@ pub(crate) fn on_error_jvm_buildpack(error: OpenJdkBuildpackError) { Thanks, Heroku "}), - OpenJdkBuildpackError::ResolveVersionError(VersionResolveError::ReadSystemPropertiesError(error)) => { + OpenJdkBuildpackError::ResolveVersionError(VersionResolveError::OpenJdkArtifactRequirementParseError(OpenJdkArtifactRequirementParseError::OpenJdkVersionParseError(_))) => { log_error( "Invalid OpenJDK version selector", formatdoc! {" @@ -134,6 +134,16 @@ pub(crate) fn on_error_jvm_buildpack(error: OpenJdkBuildpackError) { ", error = error }, ); } - OpenJdkBuildpackError::ResolveVersionError(VersionResolveError::OpenJdkArtifactRequirementParseError(OpenJdkArtifactRequirementParseError::OpenJdkVersionParseError(_))) => {} + OpenJdkBuildpackError::ResolveVersionError(VersionResolveError::ReadSystemPropertiesError(error)) => { + log_error( + "Invalid system.properties file", + formatdoc! {" + The contents of your system.properties file cannot be parsed. Please use a valid + system.properties file and try again. + + Details: {error:?} + ", error = error }, + ); + } } }