<commit_before>ExceptionHandler
================

ExceptionHandler is a standalone package to manage PHP exceptions.

## Installation

Just download and extract the package. Configures.

## Configuration

All you have to do is to:
    * set the relative path of your library,
    * include the GeSHi's file (it lives in geshi's subdirectory),
    * instantiate GeSHi,
    * instantiate the handler with the relative path of the file and an instance of GeSHi.
Then configure the PHP exception handler.

```php
<?php

// Load ExceptionHandler
$libraryPath = 'path/to/ExceptionHandler/';
require_once $libraryPath.'geshi/geshi.php';

$geshi            = new GeSHi();
$exceptionHandler = new ExceptionHandler($libraryPath, $geshi);

set_exception_handler(array($exceptionHandler, 'catchEmAll'));

```

GeSHi is used to colorize the code syntax. If you don't want to use it, configure like the following instructions:

```php
<?php

// Load ExceptionHandler
$libraryPath = 'path/to/ExceptionHandler/';

$exceptionHandler = new ExceptionHandler($libraryPath);

set_exception_handler(array($exceptionHandler, 'catchEmAll'));

```

## Mechanism

When an exception is caught, ExceptionHandler do his job and traces the exceptions' stack.<commit_msg>Edited README.md via GitHub<commit_after>ExceptionHandler
================

ExceptionHandler is a standalone package to manage PHP exceptions.

## Installation

Just download and extract the package. Configures.

## Configuration

All you have to do is to:

1.    set the relative path of your library,
2.    include the GeSHi's file (it lives in geshi's subdirectory),
3.    instantiate GeSHi,
4.    instantiate the handler with the relative path of the file and an instance of GeSHi.

Then configure the PHP exception handler.

```php
<?php

// Load ExceptionHandler
$libraryPath = 'path/to/ExceptionHandler/';
require_once $libraryPath.'ExceptionHandler.php';
require_once $libraryPath.'geshi/geshi.php';

$geshi            = new GeSHi();
$exceptionHandler = new ExceptionHandler($libraryPath, $geshi);

set_exception_handler(array($exceptionHandler, 'catchEmAll'));

```

GeSHi is used to colorize the code. If you don't want to use it, configure like the following instructions:

```php
<?php

// Load ExceptionHandler
$libraryPath = 'path/to/ExceptionHandler/';
require_once $libraryPath.'ExceptionHandler.php';

$exceptionHandler = new ExceptionHandler($libraryPath);

set_exception_handler(array($exceptionHandler, 'catchEmAll'));

```

## Mechanism

When an exception is caught, ExceptionHandler does his job and traces the exceptions' stack.
{'fraction_non_alphanumeric': 0.10459282130451564, 'fraction_numerical': 0.0015438054805094559, 'mean_word_length': 5.0, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5461463', 'n_tokens_mistral': 725, 'n_tokens_neox': 703, 'n_words': 265}