Module: Vizcore::ErrorFormatting

Defined in:
lib/vizcore/errors.rb

Overview

Small helper for concise contextual error messages.

Class Method Summary collapse

Class Method Details

.summarize(error, context:) ⇒ String

Parameters:

  • error (Exception)
  • context (String)

Returns:

  • (String)


23
24
25
# File 'lib/vizcore/errors.rb', line 23

def summarize(error, context:)
  "#{context}: #{error.class}: #{error.message}"
end