lib/alephant/broker/error_component.rb in alephant-broker-2.1.2 vs lib/alephant/broker/error_component.rb in alephant-broker-2.1.3
- old
+ new
@@ -22,10 +22,16 @@
end
private
def content_for(exception)
- "#{exception.message}\n#{exception.backtrace.join('\n')}"
+ "#{exception.message}".tap do |msg|
+ msg << "\n#{exception.backtrace.join('\n')}" if debug?
+ end
+ end
+
+ def debug?
+ Broker.config.fetch('debug', false)
end
end
end
end