Skip to content

Do not fail if an Exception has no backtrace

gitlab-qa-bot requested to merge github/fork/zinovyev/patch-1 into main

Created by: zinovyev

Currently backtrace of an exception is checked by the empty? method. But it sometimes occur that the Exception class will return nil for backtrace:

StandardError.new.backtrace.empty?
NoMethodError: undefined method `empty?' for nil:NilClass

Merge request reports