mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
ACS-2222 Add ArchivedIOException (#802)
`ArchivedIOException` and `ArchivedContentException` added to provide an appropriate response when attempting to access content that is archived, for example in GLACIER s3. Discovered and fixed a bug, when producing an error during content streaming that caused clients to hang. Content Length now set to `-1` when any `ContentIOException` is thrown so that any clients are not expecting and waiting to received the content.
This commit is contained in:
@@ -47,6 +47,7 @@ import org.alfresco.api.AlfrescoPublicApi;
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.repo.content.filestore.FileContentWriter;
|
||||
import org.alfresco.repo.content.transform.TransformerDebug;
|
||||
import org.alfresco.service.cmr.repository.ArchivedIOException;
|
||||
import org.alfresco.service.cmr.repository.ContentAccessor;
|
||||
import org.alfresco.service.cmr.repository.ContentIOException;
|
||||
import org.alfresco.service.cmr.repository.ContentReader;
|
||||
@@ -429,6 +430,7 @@ public abstract class AbstractContentReader extends AbstractContentAccessor impl
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
if (e instanceof ArchivedIOException) throw e;
|
||||
throw new ContentIOException("Failed to open stream onto channel: \n" +
|
||||
" accessor: " + this,
|
||||
e);
|
||||
|
Reference in New Issue
Block a user