summaryrefslogtreecommitdiffstats
path: root/lib/evendoors/door.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/evendoors/door.rb')
-rw-r--r--lib/evendoors/door.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/evendoors/door.rb b/lib/evendoors/door.rb
index 0fe3867..7cff0b9 100644
--- a/lib/evendoors/door.rb
+++ b/lib/evendoors/door.rb
@@ -23,16 +23,18 @@ module EvenDoors
EvenDoors::Spin.release_p p
end
#
+ def garbage
+ puts " * #{path} didn't give back #{p}" if EvenDoors::Spin.debug_errors
+ puts "\t#{@saved.data EvenDoors::ERROR_FIELD}" if @saved.action==EvenDoors::ACT_ERROR
+ release_p @saved
+ @saved = nil
+ end
+ #
def process_p p
@viewer.receive_p p if @viewer
@saved = p
receive_p p
- if not @saved.nil?
- puts "#{path} didn't give that particle back #{p}" if EvenDoors::Spin.debug_errors
- puts "\t#{p.data EvenDoors::ERROR_FIELD}" if p.action==EvenDoors::ACT_ERROR
- release_p @saved
- @saved = nil
- end
+ garbage if not @saved.nil?
end
#
def process_sys_p p