catch (Throwable e) {
// This cause is chosen to represent internal error for sub-workflow creation
String cause = StartChildWorkflowExecutionFailedCause.OPEN_CHILDREN_LIMIT_EXCEEDED.toString();
StartChildWorkflowFailedException failure = new StartChildWorkflowFailedException(0, childExecution, workflowType,
cause);
failure.initCause(e);
throw failure;
}
finally {
reply.set(new StartChildWorkflowReplyImpl(result, runId));
}