PHP Classes

File: src/Generics/GenericsException.php

Recommend this page to a friend!
  Classes of Maik Greubel   PHP Generics   src/Generics/GenericsException.php   Download  
File: src/Generics/GenericsException.php
Role: Class source
Content type: text/plain
Description: Derived Exception
Class: PHP Generics
Framework for accessing streams, sockets and logs
Author: By
Last change: Update of src/Generics/GenericsException.php
Date: 7 months ago
Size: 953 bytes
 

Contents

Class file image Download
<?php

/**
 * This file is part of the PHP Generics package.
 *
 * @package Generics
 */
namespace Generics;

use
Generics\Util\Interpolator;

/**
 * This class provides a generic exception
 *
 * @author Maik
 */
class GenericsException extends \Exception
{
    use
Interpolator;

   
/**
     * Create a new GenericsException
     *
     * @param string $message
     * The message to throw; May contain placeholder like {placeholder} and will be replaced by context
     * elements
     * @param array $context
     * The context elements to replace in message
     * @param number $code
     * Optional code
     * @param \Exception $previous
     * Optional previous exception
     */
   
public function __construct($message, array $context = array(), $code = 0, \Exception $previous = null)
    {
       
parent::__construct($this->interpolate($message, $context), $code, $previous);
    }
}