Skip to content

Commit

Permalink
Update EncodingException.php
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalbaljet committed May 12, 2022
1 parent 50cd4cc commit 842db73
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Exporters/EncodingException.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ public static function decorate(RuntimeException $runtimeException): EncodingExc
$runtimeException->getPrevious()
), function (self $exception) {
if (config('laravel-ffmpeg.set_command_and_error_output_on_exception', true)) {
$exception->message = $exception->getAlchemyException()->getMessage();
$exception->message = $exception->getAlchemyException()?->getMessage() ?: "";
}
});
}

public function getCommand(): string
public function getCommand(): ?string
{
return $this->getAlchemyException()->getCommand();
return $this->getAlchemyException()?->getCommand();
}

public function getErrorOutput(): string
public function getErrorOutput(): ?string
{
return $this->getAlchemyException()->getErrorOutput();
return $this->getAlchemyException()?->getErrorOutput();
}

public function getAlchemyException(): ExecutionFailureException
public function getAlchemyException(): ?ExecutionFailureException
{
return $this->getPrevious();
}
Expand Down

0 comments on commit 842db73

Please sign in to comment.