This repository has been archived on 2024-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
Sequenzia/lib/Rails/Exception/ExceptionTrait.php

61 lines
1.1 KiB
PHP
Raw Normal View History

2013-10-02 18:14:53 +02:00
<?php
namespace Rails\Exception;
use Rails;
trait ExceptionTrait
{
/**
* Title to show instead of the class name.
* Stetic purposes only.
*/
protected
$title,
$_title,
$_reduced_trace;
protected $skip_info = false;
protected $status = 500;
private $_error_html;
public function title()
{
$title = $this->title ?: $this->_title;
// if (!empty($params['scope'])) {
// $repl = '%scope%';
// $title = str_replace($repl, $params['scope'], $title);
// }
return $title;
}
public function shift_trace()
{
if (!$this->_reduced_trace)
$this->_reduced_trace = $this->getTrace();
array_shift($this->_reduced_trace);
}
public function get_trace()
{
return $this->_reduced_trace;
}
public function skip_info()
{
return $this->skip_info;
}
public function status()
{
return $this->status;
}
public function postMessage()
{
return '';
}
}