42 lines
932 B
PHP
42 lines
932 B
PHP
<?php namespace ZN\ErrorHandling;
|
|
/**
|
|
* ZN PHP Web Framework
|
|
*
|
|
* "Simplicity is the ultimate sophistication." ~ Da Vinci
|
|
*
|
|
* @package ZN
|
|
* @license MIT [http://opensource.org/licenses/MIT]
|
|
* @author Ozan UYKUN [ozan@znframework.com]
|
|
*/
|
|
|
|
use ZN\Lang;
|
|
use ZN\ErrorHandling\Exceptions;
|
|
|
|
class DebugException
|
|
{
|
|
/**
|
|
* Magic constructor
|
|
*
|
|
* @param string $file
|
|
* @param string $message = NULL
|
|
* @param mixed $changed = NULL
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct(string $file, ?string $message = NULL, $changed = NULL)
|
|
{
|
|
if( $data = Lang::default('ZN\CoreDefaultLanguage')::select($file, $message, $changed) )
|
|
{
|
|
$message = $data;
|
|
}
|
|
else
|
|
{
|
|
$message = $file;
|
|
}
|
|
|
|
$debug = (object) debug_backtrace(2)[1];
|
|
|
|
echo Exceptions::continue($message, $debug->file, $debug->line);
|
|
}
|
|
}
|