lib/zold/verbose_thread.rb in zold-0.13.1 vs lib/zold/verbose_thread.rb in zold-0.13.2

- old
+ new

@@ -17,10 +17,11 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. require_relative 'log' +require_relative 'backtrace' # Verbose thread. # Author:: Yegor Bugayenko (yegor256@gmail.com) # Copyright:: Copyright (c) 2018 Yegor Bugayenko # License:: MIT @@ -32,11 +33,10 @@ end def run(safe = false) yield rescue StandardError => e - @log.error("#{e.class.name}: #{e.message}") - @log.debug(e.backtrace.join("\n\t")) + @log.error(Backtrace.new(e).to_s) raise e unless safe end end end