lib/psd/layer.rb in psd-0.3.4 vs lib/psd/layer.rb in psd-0.3.5

- old
+ new

@@ -66,10 +66,12 @@ parse_mask_data parse_blending_ranges parse_legacy_layer_name parse_extra_data + PSD.logger.debug "Layer name = #{name}" + @file.seek @layer_end # Skip over any filler zeros end_section return self end @@ -308,24 +310,27 @@ info_parsed = false LAYER_INFO.each do |name, info| next unless info.key == key + PSD.logger.debug "Layer Info: key = #{key}, start = #{pos}, length = #{length}" + begin i = info.new(@file, length) i.parse @adjustments[name] = i info_parsed = true - rescue Exception + rescue Exception => e + PSD.logger.error "Parsing error: key = #{key}, message = #{e.message}" + PSD.logger.error e.backtrace.join("\n") end break end if !info_parsed - PSD.keys << key - # puts "SKIPPING #{key}, length = #{length}" + PSD.logger.debug "SKIPPING: key = #{key}, length = #{length}" @file.seek pos + length end @file.seek pos + length if @file.tell != (pos + length) end \ No newline at end of file