lib/isolator/notifier.rb in isolator-0.10.0 vs lib/isolator/notifier.rb in isolator-0.11.0
- old
+ new
@@ -27,17 +27,25 @@
end
def log_exception
return unless Isolator.config.logger
- msg = "[ISOLATOR EXCEPTION]\n" \
- "#{exception.message}"
+ separator = " ↳ "
- filtered_backtrace.each do |offense_line|
- msg += "\n ↳ #{offense_line}"
- end
+ begin
+ msg = "[ISOLATOR EXCEPTION]\n" \
+ "#{exception.message}"
- Isolator.config.logger.warn(msg)
+ filtered_backtrace.each do |offense_line|
+ msg += "\n #{separator}#{offense_line}"
+ end
+
+ Isolator.config.logger.warn(msg)
+ rescue Encoding::CompatibilityError
+ should_retry = separator != " - "
+ separator = " - "
+ retry if should_retry
+ end
end
def send_notifications
return unless uniform_notifier_loaded?