Browse files

(PUP-4047) Rephrase error message for "non productive errors"

Before this commit, it was difficult to understand the error
messages for expressions that have no effect (only produce a value).

This changes the messages to read "This xxx has no effect", followed
by more details. This removes the need to understand the concept
"non-productive expression".

This only changes the phrasing of the error message.
  • Loading branch information...
hlindberg committed Mar 2, 2015
1 parent ce0dffc commit cc9ec6bd1cb47314fa8c408c9ad56f9aa2131020
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/puppet/pops/issues.rb
@@ -507,11 +507,11 @@ def self.hard_issue(issue_code, *args, &block)

"This #{label.label(semantic)} is not productive. A non productive construct may only be placed last in a block/sequence"
"This #{label.label(semantic)} has no effect. A value-producing expression without other effect may only be placed last in a block/sequence"

IDEM_NOT_ALLOWED_LAST = hard_issue :IDEM_NOT_ALLOWED_LAST, :container do
"This #{label.label(semantic)} is not productive. #{label.a_an_uc(container)} can not end with a non productive construct"
"This #{label.label(semantic)} has no effect. #{label.a_an_uc(container)} can not end with a value-producing expression without other effect"

RESERVED_WORD = hard_issue :RESERVED_WORD, :word do

0 comments on commit cc9ec6b

Please sign in to comment.