Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Exceptions Laravel Package

graham-campbell/exceptions

Graham Campbell's Exceptions package gives Laravel apps a cleaner, more powerful exception handling setup, with custom handlers, reporting, throttling, and rendering so errors are easier to manage and debug.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Platform modernization / upgrade sequencing: v17.2.0 adds official PHP 8.4 and Laravel 11 support. If the roadmap includes an upgrade to that baseline, this package can be assessed as an enabler that removes a blocker rather than a separate initiative. Prioritize it when it unblocks the upgrade; defer it when the upgrade is already in flight (bundling error-path changes with a framework major makes regressions impossible to attribute).

  • Build vs. buy for exception handling: Rather than funding custom Laravel exception-handler code, a PM can evaluate this package as a candidate to centralize error reporting and rendering. The trade-off is real: config-driven flexibility and clean controllers versus another dependency with weak public adoption signals (0 dependents, low package score) and a single-maintainer profile. The buy case is strongest when the alternative is bespoke handler code that no one wants to own.

  • API and error-contract consistency: Config-driven mapping of exception classes to HTTP status codes and custom HTML/JSON renderers directly supports product decisions about a standard error envelope, stable error codes, and consistent behavior across web and API surfaces. It also reduces the scatter of try/catch and abort() calls across controllers — a maintainability decision, not a feature.

  • Security and production safety: Per-exception log level control and environment-aware rendering support the decision to avoid leaking stack traces, PII, or internal hostnames in production while preserving developer diagnostics locally. This is a risk-reduction decision that must be validated, not assumed.

  • Observability and incident response: Centralized reporting gives product and on-call a single place to reason about where errors go. It supports decisions about logging, alerting, and how fast incident triage can happen — but only if the team also owns the error taxonomy and mapping table.

  • Dependency governance: Adds a decision point to the roadmap about whether this remains in the stack. If already present, v17.2.0 supports a retain-and-upgrade call. If not, greenfield adoption should be gated on a proof-of-value spike and a written exit plan toward Laravel's native handler.

  • Roadmap hygiene, not user-facing value: This is an enabler. It creates no new user-facing capability. It should be scheduled when it reduces custom error-handling maintenance or removes an upgrade blocker, not marketed as a feature.

When to Consider This Package

  • Fits when you run a Laravel application on Composer and are executing or planning a move to Laravel 11 and/or PHP 8.4 — v17.2.0 explicitly supports that stack. Pin ^17.2 so earlier tags don't fight platform constraints.

  • Fits when you need centralized exception handling with configurable reporting and rendering — mapping exception types to status codes and response bodies, with consistent behavior across web and API surfaces.

  • Fits when the current handler is a sprawl of render() overrides, abort() codes, and ad-hoc try/catch, and the alternative to adopting this is writing and owning an in-house handler. It also fits when the package is already in the stack and the question is retain-and-upgrade.

  • Adoption preconditions: Define an explicit error taxonomy first — stable error codes, HTTP status mapping, documented response envelope. Adopting the package before that exists merely relocates the inconsistency. Also require golden-file tests of current error behavior, a named owner for the error contract, and a written fallback to Laravel's native handler.

  • Look elsewhere or defer when Laravel's default handler is sufficient, you are locked to older PHP/Laravel versions, or the team cannot absorb another dependency. Defer if you need large-community support, commercial backing, a formal security policy, or broad ecosystem adoption — the low dependent count and score warrant extra diligence before greenfield adoption.

  • Validate before rollout: Confirm actual version constraints, transitive dependencies, service-provider registration, published config, config:cache behavior, and how v17.x interacts with Laravel 11's bootstrap/app.php withExceptions() closure. Two competing configuration surfaces is a real risk. Run a narrow proof-of-value spike on one route or job end to end before broad adoption.

How to Pitch It (Stakeholders)

  • For executives: This is a low-cost platform-hygiene decision, not a feature investment. v17.2.0 keeps alignment with Laravel 11 and PHP 8.4, which can reduce upgrade friction and extend the life of the current stack. It supports more consistent error responses and centralized reporting, but adoption should be gated by a short validation because public adoption signals are limited. Frame success as upgrade completion, reduced custom error-handling code, and faster incident triage — not feature adoption.

  • For engineering: The package replaces Laravel's default exception handler (Illuminate\Contracts\Debug\ExceptionHandler) with a configurable reporting-and-rendering pipeline. On Laravel 11, bind it alongside ->withExceptions(); on Laravel ≤10, extend it from app/Exceptions/Handler.php. Before rollout, confirm version constraints and Laravel 11 bootstrap differences, define the error taxonomy, capture current behavior as golden-file tests (status code plus body shape per exception), and ship behind a config flag with the native handler as the fallback. Enforce that renderers are pure mappings with no I/O — no DB, cache, or outbound HTTP — so a primary outage doesn't cascade into error-path failures. Decide who reports to observability tooling; double-reporting is a real risk. Estimate days, not weeks, for wiring; the cost is in defining the error taxonomy.

  • For product: Do not position this as a user-facing deliverable. Position it as an enabler for roadmap work that depends on a supported Laravel/PHP baseline, consistent API error behavior, and safer production diagnostics. The real deliverable is the documented error-code reference that support, QA, and on-call teams use, not the code itself. Measure success through upgrade completion, reduced custom error-handling code, consistent error contracts, and faster incident triage. If golden-file coverage, an error taxonomy, and a written fallback to Laravel's native handler are all missing, defer — the package is optional, but owning the error path is not.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package