mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-19 05:45:21 +01:00
channeldb/codec: add NewUnknownElementType constructor
This commit is contained in:
parent
2ce6228021
commit
678ca9feff
@ -51,6 +51,12 @@ type UnknownElementType struct {
|
|||||||
element interface{}
|
element interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewUnknownElementType creates a new UnknownElementType error from the passed
|
||||||
|
// method name and element.
|
||||||
|
func NewUnknownElementType(method string, el interface{}) UnknownElementType {
|
||||||
|
return UnknownElementType{method: method, element: el}
|
||||||
|
}
|
||||||
|
|
||||||
// Error returns the name of the method that encountered the error, as well as
|
// Error returns the name of the method that encountered the error, as well as
|
||||||
// the type that was unsupported.
|
// the type that was unsupported.
|
||||||
func (e UnknownElementType) Error() string {
|
func (e UnknownElementType) Error() string {
|
||||||
|
Loading…
Reference in New Issue
Block a user