Skip to content

Commit

Permalink
fix(propertyFiles): change wording of error message to indicate that …
Browse files Browse the repository at this point in the history
…there might be a syntax error in the file (#1715)
  • Loading branch information
tomaslin authored Oct 18, 2017
1 parent d0c89df commit 03c5dba
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public class WaitOnJobCompletion extends AbstractCloudProviderAwareTask implemen
Map<String, Object> properties = [:]
properties = katoRestService.getFileContents(appName, account, location, name, stage.context.propertyFile)
if (properties.size() == 0) {
throw new IllegalStateException("expected properties file ${stage.context.propertyFile} but one was not found or was empty")
throw new IllegalStateException("Expected properties file ${stage.context.propertyFile} but it was either missing, empty or contained invalid syntax")
}
outputs << properties
outputs.propertyFileContents = properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class MonitorJenkinsJobTask implements OverridableTimeoutRetryableTask {
if (stage.context.propertyFile) {
properties = buildService.getPropertyFile(buildNumber, stage.context.propertyFile, master, job)
if (properties.size() == 0 && result == 'SUCCESS') {
throw new IllegalStateException("expected properties file ${stage.context.propertyFile} but one was not found or was empty")
throw new IllegalStateException("Expected properties file ${stage.context.propertyFile} but it was either missing, empty or contained invalid syntax")
}
outputs << properties
outputs.propertyFileContents = properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class MonitorJenkinsJobTaskSpec extends Specification {

then:
IllegalStateException e = thrown IllegalStateException
e.message == 'expected properties file noexist.properties but one was not found or was empty'
e.message == 'Expected properties file noexist.properties but it was either missing, empty or contained invalid syntax'
}

def "marks 'unstable' results as successful if explicitly configured to do so"() {
Expand Down

0 comments on commit 03c5dba

Please sign in to comment.