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
Common Exceptions

Common Exceptions Laravel Package

keboola/common-exceptions

Shared exception classes for Keboola PHP projects, providing a consistent exception hierarchy, error codes, and contextual data so applications can throw, catch, and report failures predictably across services and packages. Composer-ready, it helps standardize error handling without imposing a frame...

Deep Wiki
Context7

keboola/common-exceptions provides a shared set of PHP exception classes for Keboola projects, enabling consistent error handling across components. It defines base exceptions and interfaces for distinguishing user-facing errors from application errors, with support for structured error context and clean messages in logs and API responses.

  • Standard UserException and ApplicationException hierarchies
  • Consistent error codes and structured exception data
  • Interfaces for exception categorization
  • Lightweight, framework-agnostic PHP implementation
  • Easy integration with Keboola libraries and services
Frequently asked questions about Common Exceptions
How do I install keboola/common-exceptions with Composer?
Install it with Composer using composer require keboola/common-exceptions. It is a PHP library, so no Laravel service provider or extra bootstrap step is described in the overview. Composer autoloading makes the exception classes and interfaces available to your application.
Does keboola/common-exceptions work with Laravel?
The package is a plain PHP library of common exception classes and interfaces, so it can be used inside Laravel applications. The provided overview does not describe Laravel-specific integrations such as service providers, facades, or config files. Check its Composer requirements to confirm compatibility with your PHP and Laravel versions.
What problems does keboola/common-exceptions solve?
It standardizes exception hierarchies, error codes, and structured context for Keboola projects and services. That consistency makes error handling and reporting easier across applications. Use it when you want shared exception types instead of ad hoc exceptions in each codebase.
Does keboola/common-exceptions provide standardized error codes?
Yes. The library is described as providing consistent exception hierarchies and error codes. You can rely on those codes when logging, mapping errors to API responses, or routing failures. Check the specific exception classes for the exact code values available.
How does structured exception context work in keboola/common-exceptions?
Structured context means exceptions can carry additional data that explains the failure, rather than only a message string. That context can be included in logs or error reports to simplify debugging. The overview presents this as part of the common exception design, not as a logging framework.
Can I extend keboola/common-exceptions with my own exception classes?
Yes, the goal of a common exception hierarchy is to provide base classes and interfaces you can reuse. Extend the relevant base exception or implement the provided interface to keep your custom exceptions consistent. Review the available classes before creating new exception types so you do not duplicate existing behavior.
Does keboola/common-exceptions include interfaces for custom exceptions?
The package includes interfaces as well as exception classes, according to the overview. Those interfaces let you type-hint against common exception contracts in your own code. Implement them when you need custom exceptions that still fit the Keboola exception hierarchy.
How should I test code that throws keboola/common-exceptions exceptions?
Use your normal PHP testing tools, such as PHPUnit, to assert that the expected exception class is thrown. If the exception exposes error codes or context, assert those values directly in the test. Testing the hierarchy and context helps prevent accidental changes to error reporting behavior.
Is keboola/common-exceptions safe to use in production?
It is a small Composer library intended for use in Keboola projects and services, so it can be used in production applications. Because it provides exception types rather than runtime infrastructure, production concerns are mainly version pinning and compatibility with your PHP version. Use tagged releases and review changes before upgrading major versions.
What are alternatives to keboola/common-exceptions, and is it maintained?
Alternatives include framework-native exceptions, custom base exception classes, or other shared exception libraries. This package is specifically oriented toward Keboola projects and its consistent error codes and context. For maintenance status, check Packagist and the repository release history before adopting it.
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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console