Added file areas and TIC processing

This commit is contained in:
Deon George
2022-11-01 22:24:36 +11:00
parent 702c5fb4f2
commit 029a8a9d73
20 changed files with 908 additions and 35 deletions

View File

@@ -6,7 +6,7 @@ use Exception;
use Illuminate\Contracts\Filesystem\FileNotFoundException;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use League\Flysystem\UnreadableFileException;
use League\Flysystem\UnreadableFileEncountered;
use App\Models\Address;
@@ -135,7 +135,7 @@ final class Send extends Item
Log::error(sprintf('%s:! Item [%s] doesnt exist',self::LOGKEY,$file));
return;
} catch (UnreadableFileException) {
} catch (UnreadableFileEncountered) {
Log::error(sprintf('%s:! Item [%s] cannot be read',self::LOGKEY,$file));
return;
@@ -257,7 +257,7 @@ final class Send extends Item
*
* @param int $length
* @return string|null
* @throws UnreadableFileException
* @throws UnreadableFileEncountered
* @throws Exception
*/
public function read(int $length): ?string
@@ -276,7 +276,7 @@ final class Send extends Item
Log::debug(sprintf('%s: - Read [%d] bytes, file pos now [%d]',self::LOGKEY,strlen($data),$this->file_pos));
if ($data === FALSE)
throw new UnreadableFileException('Error reading file: '.$this->sending->file_name);
throw new UnreadableFileEncountered('Error reading file: '.$this->sending->file_name);
return $data;
}