2017 © Pedro Peláez
 

library error-handler-module

Error handler module for Stratify

image

stratify/error-handler-module

Error handler module for Stratify

  • Saturday, August 5, 2017
  • by mnapoli
  • Repository
  • 1 Watchers
  • 0 Stars
  • 335 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 2 % Grown

The README.md

Error handler module for Stratify

Installation

    1. Install the package:
composer require stratify/error-handler-module
    1. Enable the module:
$app = new Application([
    'stratify/error-handler-module',
]);
    1. Use the HTTP middleware:
$http = pipe([
    ErrorHandlerMiddleware::class,

    // ...
]);
$app->http($http)->run();

The HTTP middleware catches all exceptions happening in sub-middlewares and displays an error page. Because of that, you probably want that middleware to run before all others middlewares., (*1)

The default behavior is to show a very simple error page: Server error (status code 500)., (*2)

In dev environment the error page will be much more detailed thanks to the Whoops library. For security reasons (not exposing any sensitive information), this page only displays if you configure the application to run in dev environment:, (*3)

$app = new Application($modules, 'dev');

The Versions

06/12 2015

0.1.1

0.1.1.0

  Sources   Download

MIT

The Requires

 

09/09 2015