lib/sup/hook.rb in sup-0.4 vs lib/sup/hook.rb in sup-0.5
- old
+ new
@@ -84,10 +84,10 @@
result = context.instance_eval @hooks[name], fn_for(name)
rescue Exception => e
log "error running hook: #{e.message}"
log e.backtrace.join("\n")
@hooks[name] = nil # disable it
- BufferManager.flash "Error running hook: #{e.message}"
+ BufferManager.flash "Error running hook: #{e.message}" if BufferManager.instantiated?
end
context.__cleanup
result
end