Source:
<code>public void runWESCommand(String jsonInputFilePath, File localPrimaryDescriptorFile, File zippedEntry) { String workflowURL = localPrimaryDescriptorFile.getName(); final File tempDir = Files.createTempDir(); List<File> workflowAttachment = new ArrayList<>(); workflowAttachment.add(localPrimaryDescriptorFile); addFilesToWorkflowAttachment(workflowAttachment, zippedEntry, tempDir); File jsonInputFile = new File(jsonInputFilePath); workflowAttachment.add(jsonInputFile); String jsonString = null; try { jsonString = abstractEntryClient.fileToJSON(jsonInputFilePath); } catch (IOException ex) { <START> System.out.println("Could not construct JSON string from " + jsonInputFilePath + ". Request will not be sent to WES endpoint. " <END> + "Please check that the input file is proper JSON"); errorMessage(ex.getMessage(), IO_ERROR); } String languageType = this.languageType.toString().toUpperCase(); String workflowTypeVersion = WORKFLOW_TYPE_VERSION; if ("CWL".equalsIgnoreCase(languageType)) { workflowTypeVersion = "v" + WORKFLOW_TYPE_VERSION; } else if ("WDL".equalsIgnoreCase(languageType)) { workflowTypeVersion = WDL_WORKFLOW_TYPE_VERSION; } try { RunId response = clientWorkflowExecutionServiceApi.runWorkflow(jsonString, languageType, workflowTypeVersion, TAGS, "{}", workflowURL, workflowAttachment); System.out.println("Launched WES run with id: " + response.toString()); } catch (io.openapi.wes.client.ApiException e) { LOG.error("Error launching WES run", e); } finally { try { FileUtils.deleteDirectory(tempDir); } catch (IOException ioe) { LOG.error("Could not delete temporary directory" + tempDir + " for workflow attachment files", ioe); } } }</code><technical_language>LOG.error</technical_language>

Target:
public void runWESCommand(String jsonInputFilePath, File localPrimaryDescriptorFile, File zippedEntry) { String workflowURL = localPrimaryDescriptorFile.getName(); final File tempDir = Files.createTempDir(); List<File> workflowAttachment = new ArrayList<>(); workflowAttachment.add(localPrimaryDescriptorFile); addFilesToWorkflowAttachment(workflowAttachment, zippedEntry, tempDir); File jsonInputFile = new File(jsonInputFilePath); workflowAttachment.add(jsonInputFile); String jsonString = null; try { jsonString = abstractEntryClient.fileToJSON(jsonInputFilePath); } catch (IOException ex) { exceptionMessage(ex, "Could not construct JSON from " + jsonInputFilePath + ". Request will not be sent to WES " + "endpoint. Please check that the input file is proper JSON.", IO_ERROR); } String languageType = this.languageType.toString().toUpperCase(); String workflowTypeVersion = WORKFLOW_TYPE_VERSION; if ("CWL".equalsIgnoreCase(languageType)) { workflowTypeVersion = "v" + WORKFLOW_TYPE_VERSION; } else if ("WDL".equalsIgnoreCase(languageType)) { workflowTypeVersion = WDL_WORKFLOW_TYPE_VERSION; } try { RunId response = clientWorkflowExecutionServiceApi.runWorkflow(jsonString, languageType, workflowTypeVersion, TAGS, "{}", workflowURL, workflowAttachment); System.out.println("Launched WES run with id: " + response.toString()); } catch (io.openapi.wes.client.ApiException e) { LOG.error("Error launching WES run", e); } finally { try { FileUtils.deleteDirectory(tempDir); } catch (IOException ioe) { LOG.error("Could not delete temporary directory" + tempDir + " for workflow attachment files", ioe); } } }