[UTIL][EXCEPTIONS] Introduce NotStoredLocallyException

This commit is contained in:
2021-08-16 17:06:02 +01:00
parent 6445a616a8
commit c3db2f60d2
2 changed files with 34 additions and 1 deletions

View File

@@ -27,6 +27,7 @@ use App\Entity\Attachment;
use App\Util\Common;
use App\Util\Exception\DuplicateFoundException;
use App\Util\Exception\NoSuchFileException;
use App\Util\Exception\NotStoredLocallyException;
use App\Util\Exception\NotFoundException;
use App\Util\Exception\ServerException;
use SplFileInfo;
@@ -133,7 +134,9 @@ class GSFile
}
return $response;
} else {
throw new ServerException(_m('This attachment is not stored locally.'));
// @codeCoverageIgnoreStart
throw new NotStoredLocallyException;
// @codeCoverageIgnoreEnd
}
}