Refactor to custom exceptions & minor code style fixes

This commit is contained in:
Victor Gonzalez
2019-01-28 18:52:53 -05:00
parent ab17916b89
commit 7d09b428ce
5 changed files with 87 additions and 30 deletions

View File

@@ -0,0 +1,16 @@
<?php
namespace distinctm\LaravelDataSync\Exceptions;
use Exception;
use Throwable;
class NoRecordsInvalidJSONException extends Exception
{
public function __construct(string $message = "", int $code = 0, Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
$this->message = "No records or invalid JSON for {$message} model.";
}
}