def deflate(err, level=0)

      {
        'fei' => h.fei,
        'at' => err.respond_to?(:at) ? err.at : Ruote.now_to_utc_s,
        'class' => err.class.to_s,
        'message' => err.message,
        'trace' => err.backtrace,
        'details' => err.respond_to?(:ruote_details) ? err.ruote_details : nil,
        'deviations' => err.respond_to?(:deviations) ? err.deviations : nil,
        'tree' => tree
      }

    rescue => errr

      # could degenerate (and get stopped by a SystemStackError)
      deflate(errr, level + 1)
    end
def deflate(err, level=0)

      {
        'fei' => h.fei,
        'at' => err.respond_to?(:at) ? err.at : Ruote.now_to_utc_s,
        'class' => err.class.to_s,
        'message' => err.message,
        'trace' => err.backtrace,
        'details' => err.respond_to?(:ruote_details) ? err.ruote_details : nil,
        'deviations' => err.respond_to?(:deviations) ? err.deviations : nil,
        'tree' => tree
      }

    rescue => errr

      # could degenerate (and get stopped by a SystemStackError)
      deflate(errr, level + 1)
    end
Given this expression and an error, deflates the error into a hash
 (serializable).