Troubleshooting
This guide covers common issues and solutions when using Fory Go.
Error Types
Fory Go uses typed errors with specific error kinds:
type Error struct {
kind ErrorKind
message string
// Additional context fields
}
func (e Error) Kind() ErrorKind { return e.kind }
func (e Error) Error() string { return e.message }
Error Kinds
| Kind | Value | Description |
|---|---|---|
ErrKindOK | 0 | No error |
ErrKindBufferOutOfBound | 1 | Read/write beyond buffer bounds |
ErrKindTypeMismatch | 2 | Type ID mismatch |
ErrKindUnknownType | 3 | Unknown type encountered |
ErrKindSerializationFailed | 4 | General serialization failure |
ErrKindDeserializationFailed | 5 | General deserialization failure |
ErrKindMaxDepthExceeded | 6 | Recursion depth limit exceeded |
ErrKindNilPointer | 7 | Unexpected nil pointer |
ErrKindInvalidRefId | 8 | Invalid reference ID |
ErrKindHashMismatch | 9 | Struct hash mismatch |
ErrKindInvalidTag | 10 | Invalid fory struct tag |