forked from tiglabs/raft
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
27 lines (22 loc) · 725 Bytes
/
errors.go
File metadata and controls
27 lines (22 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package raft
import (
"errors"
)
var (
ErrCompacted = errors.New("requested index is unavailable due to compaction.")
ErrRaftExists = errors.New("raft already exists.")
ErrRaftNotExists = errors.New("raft not exists.")
ErrNotLeader = errors.New("raft is not the leader.")
ErrStopped = errors.New("raft is already shutdown.")
ErrSnapping = errors.New("raft is doing snapshot.")
)
type FatalError struct {
ID uint64
Err error
}
// AppPanicError is panic error when repl occurred fatal error.
// The server will recover this panic and stop the shard repl.
type AppPanicError string
func (pe *AppPanicError) Error() string {
return "Occurred application logic panic error: " + string(*pe)
}