Skip to content

Commit fa7d8ff

Browse files
committed
feat: add DownloadException.
Signed-off-by: ytetsuro <phper.0o0@gmail.com>
1 parent fa9c949 commit fa7d8ff

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php namespace CodeIgniter\Exceptions;
2+
3+
/**
4+
* Class DownloadException
5+
*
6+
* @package CodeIgniter\Exceptions
7+
*/
8+
class DownloadException extends \RuntimeException implements ExceptionInterface
9+
{
10+
11+
public static function forCannotSetFilePath(string $path)
12+
{
13+
return new static(lang('HTTP.cannotSetFilePath', [$path]));
14+
}
15+
16+
public static function forCannotSetBinary()
17+
{
18+
return new static(lang('HTTP.cannotSetBinary'));
19+
}
20+
21+
public static function forNotFoundDownloadSource(string $extension)
22+
{
23+
return new static(lang('HTTP.notFoundDownloadSource', [$extension]));
24+
}
25+
26+
}

0 commit comments

Comments
 (0)