<commit_before>RdnException
============

The **RdnException** ZF2 module normalizes all framework errors to use native PHP Exceptions.

Two exception classes to handle HTTP response are included with the module:
* `RdnException\NotFoundException` - Throwing this exception will result in a **404** response.
* `RdnException\AccessDeniedException` - Throwing this exception will result in a **403** response.

All other exceptions will result in a **500** response.

Additionally a third class `RdnException\PublicException` is included for cases where you'd like to display the exception message to the user. All HTTP exceptions extend from this class.

## How to install

This module is still under development<commit_msg>document all http exceptions and add install instructions<commit_after>RdnException
============

The **RdnException** ZF2 module normalizes all framework errors to use native PHP Exceptions.

Two exception classes to handle HTTP response are included with the module:
* `RdnException\AccessDeniedException` - Throwing this exception will result in a **403** response.
* `RdnException\BadGatewayException` - Throwing this exception will result in a **502** response.
* `RdnException\BadRequestException` - Throwing this exception will result in a **400** response.
* `RdnException\MethodNotAllowedException` - Throwing this exception will result in a **405** response.
* `RdnException\NotFoundException` - Throwing this exception will result in a **404** response.
* `RdnException\UnauthorizedException` - Throwing this exception will result in a **401** response.
* `RdnException\UnprocessableEntityException` - Throwing this exception will result in a **422** response.

All other exceptions will result in a **500** response.

Additionally a third class `RdnException\PublicException` is included for cases where you'd like to display the exception message to the user. All HTTP exceptions extend from this class.

## How to install

1. Use `composer` to require the `radnan/rdn-exception` package:

   ~~~bash
   $ composer require radnan/rdn-exception:1.*
   ~~~

2. Activate the module by including it in your `application.config.php` file:

   ~~~php
   <?php

   return array(
       'modules' => array(
           'RdnException',
           // ...
       ),
   );
   ~~~
{'fraction_non_alphanumeric': 0.0911854103343465, 'fraction_numerical': 0.016500217108119844, 'mean_word_length': 4.498806682577565, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4949237', 'n_tokens_mistral': 608, 'n_tokens_neox': 576, 'n_words': 262}