github.com/trim21/go-phpserialize@v0.0.22-0.20240301204449-2fca0319b3f0/internal/encoder/error.go (about) 1 package encoder 2 3 import ( 4 "reflect" 5 ) 6 7 type UnsupportedTypeError struct { 8 Type reflect.Type 9 } 10 11 func (e *UnsupportedTypeError) Error() string { 12 return "php serialize: can't encode type: " + e.Type.String() 13 } 14 15 type UnsupportedTypeAsMapKeyError struct { 16 Type reflect.Type 17 } 18 19 func (e *UnsupportedTypeAsMapKeyError) Error() string { 20 return "php serialize: unsupported type as key of map: " + e.Type.String() 21 } 22 23 type UnsupportedInterfaceTypeError struct { 24 Type reflect.Type 25 } 26 27 func (e *UnsupportedInterfaceTypeError) Error() string { 28 return "php serialize: can't encode type (as part of an interface): " + e.Type.String() 29 }