Package ca.uhn.fhir.rest.server.exceptions

Examples of ca.uhn.fhir.rest.server.exceptions.InternalErrorException


  public Object parse(List<List<String>> theString) throws InternalErrorException, InvalidRequestException {
    Collection<PathSpecification> retVal;
    try {
      retVal = myInstantiableCollectionType.newInstance();
    } catch (Exception e) {
      throw new InternalErrorException("Failed to instantiate " + myInstantiableCollectionType.getName(), e);
    }
   
    for (List<String> nextParamList : theString) {
      if (nextParamList.isEmpty()) {
        continue;
View Full Code Here


      for (Object next : ((Collection<?>) response)) {
        retVal.add((IResource) next);
      }
      return retVal;
    } else {
      throw new InternalErrorException("Unexpected return type: " + response.getClass().getCanonicalName());
    }
  }
View Full Code Here

      break;
    case RESOURCE:
      if (result.size() == 0) {
        throw new ResourceNotFoundException(theRequest.getId());
      } else if (result.size() > 1) {
        throw new InternalErrorException("Method returned multiple resources");
      }
      streamResponseAsResource(theServer, theResponse, result.get(0), responseEncoding, prettyPrint, requestIsBrowser, narrativeMode);
      break;
    }
  }
View Full Code Here

        return null;
      } else {
        return (IdDt) retValObj;
      }
    }
    throw new InternalErrorException("Found an object of type '" + retValObj.getClass().getCanonicalName() + "' in resource metadata for key " + theKey.name() + " - Expected " + IdDt.class.getCanonicalName());
  }
View Full Code Here

        return null;
      } else {
        return (InstantDt) retValObj;
      }
    }
    throw new InternalErrorException("Found an object of type '" + retValObj.getClass().getCanonicalName() + "' in resource metadata for key " + theKey.name() + " - Expected " + InstantDt.class.getCanonicalName());
  }
View Full Code Here

            b.append('/');
            b.append(Constants.PARAM_HISTORY);
            b.append('/');
            b.append(versionId.getValue());
          } else {
            throw new InternalErrorException("Server did not provide a VERSION_ID in the resource metadata for resource with ID " + resId);
          }
        }

        InstantDt published = getInstantFromMetadataOrNullIfNone(next.getResourceMetadata(), ResourceMetadataKeyEnum.PUBLISHED);
        if (published == null) {
View Full Code Here

    Object response;
    try {
      response = this.getMethod().invoke(theResourceProvider, params);
    } catch (IllegalAccessException e) {
      throw new InternalErrorException(e);
    } catch (IllegalArgumentException e) {
      throw new InternalErrorException(e);
    } catch (InvocationTargetException e) {
      throw new InternalErrorException(e);
    }

    return toResourceList(response);

  }
View Full Code Here

        return (IdDt) retValObj;
      }
    } else if (retValObj instanceof Number) {
      return new IdDt(((Number)retValObj).toString());
    }
    throw new InternalErrorException("Found an object of type '" + retValObj.getClass().getCanonicalName() + "' in resource metadata for key " + theKey.name() + " - Expected " + IdDt.class.getCanonicalName());
  }
View Full Code Here

          return null;
        } else {
          return (InstantDt) retValObj;
        }
      }
      throw new InternalErrorException("Found an object of type '" + retValObj.getClass().getCanonicalName() + "' in resource metadata for key " + theKey.name() + " - Expected " + InstantDt.class.getCanonicalName());
    }
View Full Code Here

          return null;
        } else {
          return (String) retValObj;
        }
      }
      throw new InternalErrorException("Found an object of type '" + retValObj.getClass().getCanonicalName() + "' in resource metadata for key " + theKey.name() + " - Expected " + String.class.getCanonicalName());
    }
View Full Code Here

TOP

Related Classes of ca.uhn.fhir.rest.server.exceptions.InternalErrorException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.