php-ml/src/Phpml/Exception/DatasetException.php

30 lines
625 B
PHP
Raw Normal View History

2016-04-06 19:46:17 +00:00
<?php
2016-11-20 21:53:17 +00:00
declare(strict_types=1);
2016-04-06 19:46:17 +00:00
namespace Phpml\Exception;
class DatasetException extends \Exception
{
/**
* @return DatasetException
*/
public static function missingFile($filepath)
{
2016-07-16 21:29:40 +00:00
return new self(sprintf('Dataset file "%s" missing.', $filepath));
}
/**
* @return DatasetException
*/
public static function missingFolder($path)
{
return new self(sprintf('Dataset root folder "%s" missing.', $path));
2016-04-06 19:46:17 +00:00
}
public static function cantOpenFile($filepath)
{
2016-07-16 21:29:40 +00:00
return new self(sprintf('Dataset file "%s" can\'t be open.', $filepath));
2016-04-06 19:46:17 +00:00
}
}