Skip to content

Commit

Permalink
Add error message for system.properties parse errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Malax committed Dec 20, 2024
1 parent 50fc0dd commit f535917
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions buildpacks/jvm/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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! {"
Expand All @@ -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 },
);
}
}
}

0 comments on commit f535917

Please sign in to comment.