1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00
psalm/src/CodeInspector/ExceptionHandler.php

23 lines
466 B
PHP
Raw Normal View History

<?php
namespace CodeInspector;
class ExceptionHandler
{
2016-06-09 18:08:25 -04:00
public static function accepts(Issue\CodeIssue $e)
{
2016-06-09 18:08:25 -04:00
$config = Config::getInstance();
if ($config->excludeIssueInFile(get_class($e), $e->getFileName())) {
return false;
}
if ($config->stop_on_error) {
throw new CodeException($e->getMessage());
}
echo get_class($e) . PHP_EOL;
echo $e->getMessage() . PHP_EOL;
}
}