for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace FigTree\Exceptions;
use Exception as PHPException;
use FigTree\Exceptions\Concerns\HasSeverity;
use FigTree\Exceptions\Contracts\{
SevereExceptionInterface,
LocatableExceptionInterface,
};
class Exception extends PHPException implements SevereExceptionInterface, LocatableExceptionInterface
{
use HasSeverity;
/**
* If required, set the file and line where the Exception was thrown.
*
* @param string $file
* @param int $line
* @return $this
*/
public function setLocation(string $file, int $line): LocatableExceptionInterface
if (file_exists($file)) {
$this->file = $file;
$this->line = max(0, $line);
}
return $this;