View Javadoc
1   package ca.uhn.fhir.rest.server.exceptions;
2   
3   import org.hl7.fhir.instance.model.api.IBaseOperationOutcome;
4   
5   import ca.uhn.fhir.rest.api.Constants;
6   import ca.uhn.fhir.util.CoverageIgnore;
7   
8   /*
9    * #%L
10   * HAPI FHIR - Core Library
11   * %%
12   * Copyright (C) 2014 - 2018 University Health Network
13   * %%
14   * Licensed under the Apache License, Version 2.0 (the "License");
15   * you may not use this file except in compliance with the License.
16   * You may obtain a copy of the License at
17   * 
18   *      http://www.apache.org/licenses/LICENSE-2.0
19   * 
20   * Unless required by applicable law or agreed to in writing, software
21   * distributed under the License is distributed on an "AS IS" BASIS,
22   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23   * See the License for the specific language governing permissions and
24   * limitations under the License.
25   * #L%
26   */
27  
28  /**
29   * Represents an <b>HTTP 500 Internal Error</b> response.
30   * This status indicates that the server failed to successfully process the
31   * request. This generally means that the server is misbehaving or is
32   * misconfigured in some way, although a misbehaving server might also
33   * send this status code in the case of a bad request message (although it
34   * should not do this; an HTTP 4xx response is more appropriate in that
35   * situation).
36   * 
37   * <p>
38   * Note that a complete list of RESTful exceptions is available in the
39   * <a href="./package-summary.html">Package Summary</a>.
40   * </p>
41   * 
42   * @see UnprocessableEntityException Which should be used for business level validation failures
43   */
44  @CoverageIgnore
45  public class InternalErrorException extends BaseServerResponseException {
46  
47  	public static final int STATUS_CODE = Constants.STATUS_HTTP_500_INTERNAL_ERROR;
48  	
49  	private static final long serialVersionUID = 1L;
50  
51  	/**
52  	 * Constructor
53  	 * 
54  	 * @param theMessage
55  	 *            The message
56  	 *  @param theOperationOutcome The OperationOutcome resource to return to the client
57  	 */
58  	public InternalErrorException(String theMessage, IBaseOperationOutcome theOperationOutcome) {
59  		super(STATUS_CODE, theMessage, theOperationOutcome);
60  	}
61  
62  	public InternalErrorException(String theMessage) {
63  		super(STATUS_CODE, theMessage);
64  	}
65  
66  	public InternalErrorException(String theMessage, Throwable theCause) {
67  		super(STATUS_CODE, theMessage, theCause);
68  	}
69  
70  	public InternalErrorException(Throwable theCause) {
71  		super(STATUS_CODE, theCause);
72  	}
73  
74  }