MCPcopy Index your code
hub / github.com/devaccuracy/ledgerforge / logAndRecordError

Method logAndRecordError

transaction.go:1664–1668  ·  view source on GitHub ↗

logAndRecordError logs an error message and records the error in the tracing span. It returns a formatted error message combining the provided message and the original error. Parameters: - span trace.Span: The tracing span to record the error. - msg string: The error message to log and include in t

(span trace.Span, msg string, err error)

Source from the content-addressed store, hash-verified

1662// Returns:
1663// - error: A formatted error message combining the provided message and the original error.
1664func (l *LedgerForge) logAndRecordError(span trace.Span, msg string, err error) error {
1665 span.RecordError(err)
1666 logrus.WithError(err).Error(msg)
1667 return fmt.Errorf("%s: %w", msg, err)
1668}
1669
1670// RejectTransaction rejects a transaction by updating its status and recording the rejection reason.
1671// It starts a tracing span, updates the transaction status and metadata, persists the transaction, and records relevant events and errors.

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected