Sha256: 9ee197129c2c7723c338604bb351c53b6e689052d9e1c872207f63737fcdd646
Contents?: true
Size: 457 Bytes
Versions: 10
Compression:
Stored size: 457 Bytes
Contents
# frozen_string_literal: true module Twiglet class ErrorSerialiser def serialise_error(error) error_fields = { error: { type: error.class.to_s, message: error.message } } add_stack_trace(error_fields, error) end private def add_stack_trace(hash_to_add_to, error) hash_to_add_to[:error][:stack_trace] = error.backtrace if error.backtrace hash_to_add_to end end end
Version data entries
10 entries across 10 versions & 1 rubygems