Simplify PSR-4 autoload
This commit is contained in:
parent
8eb280bab0
commit
dfdf6fef76
12 changed files with 1 additions and 2 deletions
24
classes/Exception/YoutubedlException.php
Normal file
24
classes/Exception/YoutubedlException.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace Alltube\Library\Exception;
|
||||
|
||||
use Symfony\Component\Process\Process;
|
||||
|
||||
/**
|
||||
* Generic youtube-dl error.
|
||||
*/
|
||||
class YoutubedlException extends AlltubeLibraryException
|
||||
{
|
||||
/**
|
||||
* YoutubedlException constructor.
|
||||
*
|
||||
* @param Process<string> $process Process that caused the exception
|
||||
*/
|
||||
public function __construct(Process $process)
|
||||
{
|
||||
parent::__construct(
|
||||
$process->getCommandLine() . ' failed with this error:' . PHP_EOL . trim($process->getErrorOutput()),
|
||||
intval($process->getExitCode())
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue