Skip to content

ErrorHandling

Corey Avis edited this page Aug 13, 2026 · 1 revision

Error Handling Documentation

This documentation will help you to better understand how errors are handled within the CoreyPHP library.

Table of Contents

  1. Error Handling Strategy
  2. Public Error Management Methods
  3. Internal Error Dispatching
  4. Custom Error Views

Error Handling Strategy

The CoreyPHP library uses an adaptive, environment-aware error reporting pipeline. Depending on your configuaration settings and PHP ini environment values, the library intelligently chooses between throwing exceptions, triggering native user-level errors, or safely formatting debugging dumps.

Public Error Management Methods

These are the public-facing methods you can use to explicitly route caught errors or pass system logs through the CoreyPHP formatting engines.

Internal Error Dispatching

Custom Error Views

When an unexpected exception slips past your custom app logic and is processed directly by exceptionMsg(), CoreyPHP outputs a clean developer block containing critical data points:

  • Error Title: Labeled prominently as CoreyPHP Exception.
  • File metadata: Explicit line references tracking the origin.
  • Stack Trace: A boxed preformatted trace dump highlighting execution steps.

NOTE: In production environments, ensure debug is turned off and display_errors is set to 0 in your php.ini settings to prevent leaking these detailed code views to users.


Home | Error Handling

Clone this wiki locally