private ModuleDeploymentStatus createResult(String pathString, Throwable t) {
		ModuleDeploymentsPath path = new ModuleDeploymentsPath(pathString);
		ModuleDescriptor.Key key = new ModuleDescriptor.Key(
				path.getDeploymentUnitName(),
				ModuleType.valueOf(path.getModuleType()),
				path.getModuleLabel());

		return new ModuleDeploymentStatus(path.getContainer(), path.getModuleSequence(), key,
				ModuleDeploymentStatus.State.failed, ZooKeeperUtils.getStackTrace(t));
	}
Create a {@link ModuleDeploymentStatus} from a ZooKeeper path and a {@code Throwable}.

@param pathString  ZooKeeper module deployment path
@param t           exception thrown while attempting deployment
@return result based on exception
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/server/admin/deployment/zk/ModuleDeploymentWriter.java