Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 672 Bytes

File metadata and controls

26 lines (18 loc) · 672 Bytes

marko/errors-simple

The default error handler --- catches exceptions and displays them with full context and fix suggestions.

Installation

composer require marko/errors-simple

Quick Example

use Marko\Core\Exceptions\MarkoException;

// Throw rich exceptions --- the handler displays context and fix suggestions automatically
throw new MarkoException(
    message: 'Configuration invalid',
    context: 'Loading payment gateway settings',
    suggestion: 'Check that API_KEY is set in your .env file',
);

Documentation

Full usage, API reference, and examples: marko/errors-simple