Download the PHP package rammewerk/error-handler without Composer

On this page you can find all versions of the php package rammewerk/error-handler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package error-handler

Rammewerk ErrorHandler

A simple and flexible way to handle and manage errors and exceptions in your PHP application.

Installation

Usage

The error handler should be registered early in your application to ensure they capture any issues that might occur from the outset. If registered late, initial errors might go uncaught. Early registration also promotes structured error management, facilitating easier debugging and maintenance.

There are basically no difference between the log and report. Log closures will be called first, then the reports. So you can add different log handlers at later point in script, even though an earlier registered report closure might be used to exit PHP.

log closures are called in the order they got registered. reports are called the in reverse order. So you can early in your application add a general message and then later on add new reports to handle different scenarios the handler calls the "general" error report.

Why use Rammewerk ErrorHandler?

PHP will either throw exceptions - which are intended to be caught - or print Errors which are generally unrecoverable. But instead of having to deal with both exceptions and errors, we convert errors so you only have to deal with exceptions. No more @file_get_contents just nice and neat try/catch.

Uncaught exceptions will be given to your log and report closures.

Many other frameworks or libraries are way more advanced, and comes with loads of functions. This ErrorHandler is simple by design - you decide how to handle your uncaught exceptions and errors.

Tips

Example

Handle different type of exceptions

report and log closures handle any Throwable exceptions. To distinguish between exception types, incorporate an instanceOf check within the closure.


All versions of error-handler with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rammewerk/error-handler contains the following files

Loading the files please wait ....