Skip to content

refactor: rename ErrActorPanic to ActorPanicError and add Unwrap#155

Merged
joshua-temple merged 1 commit into
mainfrom
refactor/actor-panic-error-naming
Jun 14, 2026
Merged

refactor: rename ErrActorPanic to ActorPanicError and add Unwrap#155
joshua-temple merged 1 commit into
mainfrom
refactor/actor-panic-error-naming

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

What this change does

Renames the actor-panic error type ErrActorPanic to ActorPanicError and gives it an Unwrap() method, bringing it in line with its sibling panic error types — GuardPanicError, AssignPanicError, and ActionPanicError — which are all typed structs with Error() and Unwrap(). The ErrXxx prefix is conventionally reserved for sentinel error values; this type is a struct, so the old name was misleading. Unwrap() lets errors.As/errors.Is reach an underlying error when the recovered panic value is itself an error. The type now lives alongside its siblings in errors.go, and its field follows the sibling Recovered any shape.

Why

A consistent error surface before the 1.0 API freeze — renaming an exported type after 1.0 would be a breaking change.

Relates to: 1.0 stability hardening

Checklist

  • Commits are signed off (git commit -s) per the DCO
  • Conventional commit messages (type: subject)
  • mage check passes locally — the state module passes lint, race tests, and govulncheck; the only mage check failure is the same pre-existing telemetry/datadog stdlib vulnerability noted above, unrelated to this change.
  • Tests added/updated for the change
  • Public API changes documented (godoc) and noted for the changelog

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple joshua-temple force-pushed the refactor/actor-panic-error-naming branch from 9d4ee73 to 2b90847 Compare June 14, 2026 02:15
@joshua-temple joshua-temple merged commit aad5eb2 into main Jun 14, 2026
2 checks passed
@joshua-temple joshua-temple deleted the refactor/actor-panic-error-naming branch June 14, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant