Sha256: dd337e1f7a8a53a9b013c472211507dce11dc2d6f875aa1480162f57aa5a62b4
Contents?: true
Size: 468 Bytes
Versions: 5
Compression:
Stored size: 468 Bytes
Contents
module BerkeleyLibrary module Logging module ExceptionSerializer def serialize_exc(ex, serialized = Set.new) raw_result = { name: ex.class.name, message: ex.message, stack: ex.backtrace } raw_result.tap do |result| next unless (cause = ex.cause) next if (serialized << ex).include?(cause) # prevent circular references result[:cause] = serialize_exc(cause, serialized) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems