lib/measures/AedgSmallToMediumOfficeInteriorLightingControls/resources/OsLib_AedgMeasures.rb in openstudio-aedg-0.1.1 vs lib/measures/AedgSmallToMediumOfficeInteriorLightingControls/resources/OsLib_AedgMeasures.rb in openstudio-aedg-0.2.0

- old
+ new

@@ -46,22 +46,18 @@ end end end if ashraeClimateZone == '' # should this be not applicable or error? - if !runner.nil? - runner.registerError("Please assign an ASHRAE Climate Zone to your model using the site tab in the OpenStudio application. The measure can't make AEDG recommendations without this information.") - end + runner&.registerError("Please assign an ASHRAE Climate Zone to your model using the site tab in the OpenStudio application. The measure can't make AEDG recommendations without this information.") return false # note - for this to work need to check for false in measure.rb and add return false there as well. else climateZoneNumber = ashraeClimateZone.split(//).first end # expected climate zone number should be 1 through 8 if !['1', '2', '3', '4', '5', '6', '7', '8'].include? climateZoneNumber - if !runner.nil? - runner.registerError('ASHRAE climate zone number is not within expected range of 1 to 8.') - end + runner&.registerError('ASHRAE climate zone number is not within expected range of 1 to 8.') return false # note - for this to work need to check for false in measure.rb and add return false there as well. end result = climateZoneNumber # don't add return false here, need to catch errors above