From b3441561cfca0b0101aae532b1534477f5c1360a Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Tue, 27 Feb 2018 18:36:30 +0100 Subject: [PATCH] lnwire: make ErrorCode satisfy error interface --- lnwire/error.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lnwire/error.go b/lnwire/error.go index fb338c43..9f47bfef 100644 --- a/lnwire/error.go +++ b/lnwire/error.go @@ -48,6 +48,13 @@ func (e ErrorCode) String() string { } } +// Error returns the human redable version of the target ErrorCode. +// +// Satisfies the Error interface. +func (e ErrorCode) Error() string { + return e.String() +} + // ErrorData is a set of bytes associated with a particular sent error. A // receiving node SHOULD only print out data verbatim if the string is composed // solely of printable ASCII characters. For reference, the printable character