import org.onap.aaf.cadi.client.EClient;
import org.onap.aaf.cadi.client.Future;
import org.onap.aaf.cadi.client.Rcli;
import org.onap.aaf.cadi.client.EClient;
import org.onap.aaf.cadi.client.Future;
import org.onap.aaf.cadi.client.Rcli;
import org.onap.aaf.misc.env.APIException;
import org.onap.aaf.misc.env.Data;
import org.onap.aaf.misc.env.Data.TYPE;
import org.onap.aaf.misc.env.APIException;
import org.onap.aaf.misc.env.Data;
import org.onap.aaf.misc.env.Data.TYPE;
- try {
- // Build URL from given URI plus current Settings
- if (uri.getPath()==null) {
- throw new APIException("Invalid URL entered for HClient");
- }
- StringBuilder pi=null;
- if (pathinfo!=null) { // additional pathinfo
- pi = new StringBuilder(uri.getPath());
- if (!pathinfo.startsWith("/")) {
- pi.append('/');
- }
- pi.append(pathinfo);
+ // Build URL from given URI plus current Settings
+ if (uri.getPath()==null) {
+ throw new APIException("Invalid URL entered for HClient");
+ }
+ StringBuilder pi=null;
+ if (pathinfo!=null) { // additional pathinfo
+ pi = new StringBuilder(uri.getPath());
+ if (!pathinfo.startsWith("/")) {
+ pi.append('/');
pi==null?uri.getPath():pi.toString(),
query==null?uri.getQuery():query,
fragment==null?uri.getFragment():fragment
pi==null?uri.getPath():pi.toString(),
query==null?uri.getQuery():query,
fragment==null?uri.getFragment():fragment
- throw new APIException(e);
+ if(sendURI==null) {
+ throw new APIException("Cannot connect to Root URI: " + uri.toString(),e);
+ } else {
+ throw new APIException("Cannot connect to " + sendURI.toString() + "(Root URI: " + uri.toString() +')',e);
+ }
protected HttpURLConnection getConnection(URI uri, StringBuilder pi) throws IOException, URISyntaxException {
URL url = new URI(
uri.getScheme(),
protected HttpURLConnection getConnection(URI uri, StringBuilder pi) throws IOException, URISyntaxException {
URL url = new URI(
uri.getScheme(),