-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
40 lines (34 loc) · 1.95 KB
/
Copy patherrors.go
File metadata and controls
40 lines (34 loc) · 1.95 KB
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
35
36
37
38
39
40
package rocks
import "errors"
// Sentinel errors callers can branch on with errors.Is.
//
// These replace the "deep cc/cmake failure or generic os.exit from
// the Lua side" pattern that tt currently string-matches on. Every facade
// method documents which of these it can return.
var (
// ErrMissingTarantoolHeaders signals that a build backend needs the
// Tarantool development headers but Config.Tarantool.IncludeDir is
// unset or does not contain `tarantool/module.h`.
ErrMissingTarantoolHeaders = errors.New("rocks: tarantool headers not found")
// ErrMissingTarantoolBinary signals that an operation requires the
// `tarantool` binary on disk (e.g. shelling out for capability probes)
// and Config.Tarantool.Executable is unset or does not point at an
// executable.
ErrMissingTarantoolBinary = errors.New("rocks: tarantool binary not found")
// ErrUnsupportedCommand is a reserved sentinel for callers that want to
// reject a luarocks subcommand they consider out of scope. It is not
// returned by this package today: Exec passes argv straight to the
// embedded dispatcher, and the typed methods use ErrNotImplemented.
ErrUnsupportedCommand = errors.New("rocks: unsupported command")
// ErrUnsupportedRockspecFeature signals that a rockspec used a feature
// the evaluator does not implement (e.g. build.type outside the
// {"builtin","cmake","make","command","none"} set, or a platforms
// block we don't recognize). Fail loud rather than silently skip.
ErrUnsupportedRockspecFeature = errors.New("rocks: unsupported rockspec feature")
// ErrNotImplemented signals that the active backend (Engine) has no
// implementation for the invoked method. It is the SOLE error a method
// returns in that case — no silent no-op, no zero-value success.
// Callers branch on it with errors.Is(err, ErrNotImplemented) to
// detect an unsupported operation for the selected backend.
ErrNotImplemented = errors.New("rocks: method not implemented by this backend")
)