/
common.go
34 lines (31 loc) · 1.36 KB
/
common.go
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
28
29
30
31
32
33
34
package exitcode
// Common error codes that may be shared by different actors.
// Actors may also define their own codes, including redefining these values.
const (
// ErrIllegalArgument indicates that a method parameter is invalid.
ErrIllegalArgument = FirstActorErrorCode + iota
// ErrNotFound indicates that a requested resource does not exist.
ErrNotFound
// ErrForbidden indicates that an action is disallowed.
ErrForbidden
// ErrInsufficientFunds indicates that a balance of funds is insufficient.
ErrInsufficientFunds
// ErrIllegalState indicates that an actor's internal state is invalid.
ErrIllegalState
// ErrSerialization indicates a de/serialization failure within actor code.
ErrSerialization
// ErrUnhandledMessage indicates that the actor cannot handle this message.
ErrUnhandledMessage
// ErrUnspecified indicates that the actor failed with an unspecified error.
ErrUnspecified
// ErrAssertionFailed indicates that the actor failed a user-level assertion
ErrAssertionFailed
// ErrReadOnly indicates that the actor cannot perform the requested operation
// in read-only mode.
ErrReadOnly
/// ErrNotPayable indicates the method cannot handle a transfer of value.
ErrNotPayable
// Common error codes stop here. If you define a common error code above
// this value it will have conflicting interpretations
FirstActorSpecificExitCode = ExitCode(32)
)