system: wrap op errors
Some checks failed
Test / Create distribution (push) Successful in 34s
Test / Hakurei (push) Failing after 1m5s
Test / Sandbox (push) Failing after 1m28s
Test / Hpkg (push) Failing after 1m53s
Test / Hakurei (race detector) (push) Failing after 2m8s
Test / Sandbox (race detector) (push) Failing after 3m33s
Test / Flake checks (push) Has been skipped

This passes more information allowing for better error handling. This eliminates generic WrapErr from system.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-08-30 23:27:22 +09:00
parent 57ade7aeaa
commit 9963e7eba2
15 changed files with 211 additions and 222 deletions

View File

@@ -62,7 +62,7 @@ func (a *App) String() string {
return fmt.Sprintf("(unsealed app %s)", a.id)
}
// Seal determines the outcome of [hst.Config] as a [SealedApp].
// Seal determines the [Outcome] of [hst.Config].
// Values stored in and referred to by [hst.Config] might be overwritten and must not be used again.
func (a *App) Seal(config *hst.Config) (*Outcome, error) {
a.mu.Lock()

View File

@@ -65,7 +65,7 @@ func ShimMain() {
if errors.Is(err, syscall.EBADF) {
log.Fatal("invalid config descriptor")
}
if errors.Is(err, container.ErrNotSet) {
if errors.Is(err, container.ErrReceiveEnv) {
log.Fatal("HAKUREI_SHIM not set")
}