- Avoid processing the assignments, for which the assignments_full-texts subdirectory cannot be created.
- Avoid a double-log.
This commit is contained in:
parent
7f3ca80959
commit
4a95826f58
|
@ -91,12 +91,10 @@ public class PublicationsRetrieverPlugin {
|
|||
|
||||
File curAssignmentsDirs = new File(FileUtils.storeDocFilesDir);
|
||||
try {
|
||||
if ( !curAssignmentsDirs.mkdirs() ) // Create the subdirectory.
|
||||
logger.error("Could not create the \"assignments_" + assignmentRequestCounter + "_fullTexts\" directories: \"" + FileUtils.storeDocFilesDir + "\"!");
|
||||
if ( ! curAssignmentsDirs.mkdirs() ) // Create the subdirectory. It may return "false", in case it already exists (will not happen, unless there is problem in cleaning up of the subdirectories) or any problem occurred.
|
||||
throw new RuntimeException("Could not create the \"assignments_" + assignmentRequestCounter + "_fullTexts\" directories: \"" + FileUtils.storeDocFilesDir + "\"!");
|
||||
} catch (Exception e) { // Mainly a SecurityException.
|
||||
String errorMsg = "Failed to create the full-texts directory for assignments_" + assignmentRequestCounter;
|
||||
logger.error(errorMsg, e);
|
||||
throw new RuntimeException(errorMsg + ": " + e.getMessage());
|
||||
throw new RuntimeException("Failed to create the full-texts directory for assignments_" + assignmentRequestCounter + ": " + e.getMessage());
|
||||
}
|
||||
|
||||
// Start loading and checking urls.
|
||||
|
|
Loading…
Reference in New Issue