Class BulkStorageException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.broadleafcommerce.asset.service.BulkStorageException
- All Implemented Interfaces:
Serializable
An exception that is thrown when many file operations are being performed in bulk (ex: adding/deleting many files in a loop).
Rather than performing each operation and immediately failing when an issue occurs, catch each
exception and store it in a map, and then continue to attempt processing the remaining elements.
At the end of the process, if there were any errors, throw this single
BulkStorageException
, providing it the previously collected map of filenames and the
exceptions that were thrown when processing them.
The intention is to allow successful processing of as many files as possible before throwing the exception, as well as providing useful information to the caller by specifying which files had which errors.
- Author:
- Samarth Dhruva (samarthd)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
BulkStorageException
-
-
Method Details
-
getGivenFilenamesToErrors
- Returns:
- a map of filenames to the errors they experienced when being processed
-