001package ca.uhn.fhir.rest.server.exceptions;
002
003import org.hl7.fhir.instance.model.api.IBaseOperationOutcome;
004
005import ca.uhn.fhir.util.CoverageIgnore;
006
007/*
008 * #%L
009 * HAPI FHIR - Core Library
010 * %%
011 * Copyright (C) 2014 - 2021 Smile CDR, Inc.
012 * %%
013 * Licensed under the Apache License, Version 2.0 (the "License");
014 * you may not use this file except in compliance with the License.
015 * You may obtain a copy of the License at
016 *
017 *      http://www.apache.org/licenses/LICENSE-2.0
018 *
019 * Unless required by applicable law or agreed to in writing, software
020 * distributed under the License is distributed on an "AS IS" BASIS,
021 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
022 * See the License for the specific language governing permissions and
023 * limitations under the License.
024 * #L%
025 */
026
027/**
028 * Exception for use when a response is received or being sent that does not correspond to any other exception type. An HTTP status code must be provided, and will be provided to the caller in the
029 * case of a server implementation.
030 */
031@CoverageIgnore
032public class UnclassifiedServerFailureException extends BaseServerResponseException {
033
034        /**
035         * Constructor
036         * 
037         * @param theStatusCode
038         *            The HTTP status code to return (e.g. 404 if you wish to return an HTTP 404 status)
039         * @param theMessage
040         *            The message to add to the status line
041         */
042        public UnclassifiedServerFailureException(int theStatusCode, String theMessage) {
043                super(theStatusCode, theMessage);
044        }
045
046        /**
047         * Constructor
048         * 
049         * @param theStatusCode
050         *            The HTTP status code to return (e.g. 404 if you wish to return an HTTP 404 status)
051         * @param theMessage
052         *            The message to add to the status line
053         *  @param theOperationOutcome The OperationOutcome resource to return to the client
054         */
055        public UnclassifiedServerFailureException(int theStatusCode, String theMessage, IBaseOperationOutcome theOperationOutcome) {
056                super(theStatusCode, theMessage, theOperationOutcome);
057        }
058
059        private static final long serialVersionUID = 1L;
060
061}