Source:
<code>public Response createBranchWithId(long branchUuid, NewBranch data) { setUpHttpHeaders(); if (branchUuid <= 0) { throw new OseeWebApplicationException(Status.BAD_REQUEST, "branchUuid [%d] uuid must be > 0", branchUuid); } CreateBranchData createData = new CreateBranchData(); createData.setUuid(branchUuid); createData.setName(data.getBranchName()); createData.setBranchType(data.getBranchType()); createData.setCreationComment(data.getCreationComment()); createData.setUserArtifact(getArtifactById(COMMON_ID, data.getAuthorId())); createData.setAssociatedArtifact(getArtifactById(COMMON_ID, data.getAssociatedArtifactId())); createData.setFromTransaction(TokenFactory.createTransaction(data.getSourceTransactionId())); createData.setParentBranchUuid(getBranchUuidFromTxId(data.getSourceTransactionId())); createData.setMergeDestinationBranchId(data.getMergeDestinationBranchId()); createData.setMergeAddressingQueryId(data.getMergeAddressingQueryId()); createData.setTxCopyBranchType(data.isTxCopyBranchType()); Callable<BranchReadable> op = getBranchOps().createBranch(createData); BranchReadable result = executeCallable(op); UriInfo uriInfo = getUriInfo(); URI uri = getBranchLocation(uriInfo, result); <START> <END> activityLog.createEntry(BRANCH_OPERATION_TYPEID, ActivityLog.INITIAL_STATUS, String.format( "Branch Operation Create Branch {branchUUID: %s, branchName: %s accountId: %s serverId: %s clientId: %s}", branchUuid, data.getBranchName(), accountId, serverId, clientId)); return Response.created(uri).entity(asBranch(result)).build(); }</code><technical_language>try/catch this logging affect normal operations</technical_language>

Target:
public Response createBranchWithId(long branchUuid, NewBranch data) { if (branchUuid <= 0) { throw new OseeWebApplicationException(Status.BAD_REQUEST, "branchUuid [%d] uuid must be > 0", branchUuid); } CreateBranchData createData = new CreateBranchData(); createData.setUuid(branchUuid); createData.setName(data.getBranchName()); createData.setBranchType(data.getBranchType()); createData.setCreationComment(data.getCreationComment()); createData.setUserArtifact(getArtifactById(COMMON_ID, data.getAuthorId())); createData.setAssociatedArtifact(getArtifactById(COMMON_ID, data.getAssociatedArtifactId())); createData.setFromTransaction(TokenFactory.createTransaction(data.getSourceTransactionId())); createData.setParentBranchUuid(getBranchUuidFromTxId(data.getSourceTransactionId())); createData.setMergeDestinationBranchId(data.getMergeDestinationBranchId()); createData.setMergeAddressingQueryId(data.getMergeAddressingQueryId()); createData.setTxCopyBranchType(data.isTxCopyBranchType()); Callable<BranchReadable> op = getBranchOps().createBranch(createData); BranchReadable result = executeCallable(op); UriInfo uriInfo = getUriInfo(); URI uri = getBranchLocation(uriInfo, result); try { activityLog.createEntry(BRANCH_OPERATION_TYPEID, ActivityLog.INITIAL_STATUS, String.format( "Branch Operation Create Branch {branchUUID: %s, branchName: %s accountId: %s serverId: %s clientId: %s}", branchUuid, data.getBranchName(), RestUtil.getAccountId(httpHeaders), RestUtil.getServerId(httpHeaders), RestUtil.getClientId(httpHeaders))); } catch (OseeCoreException ex) { OseeLog.log(ActivityLog.class, OseeLevel.SEVERE_POPUP, ex); } return Response.created(uri).entity(asBranch(result)).build(); }