001 /*
002 * Copyright (c) 2011, Cloudera, Inc. All Rights Reserved.
003 *
004 * Cloudera, Inc. licenses this file to you under the Apache License,
005 * Version 2.0 (the "License"). You may not use this file except in
006 * compliance with the License. You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
011 * CONDITIONS OF ANY KIND, either express or implied. See the License for
012 * the specific language governing permissions and limitations under the
013 * License.
014 */
015 package com.cloudera.lib.server;
016
017 import com.cloudera.lib.lang.XException;
018
019 /**
020 * Exception thrown by {@link Service} implementations.
021 */
022 public class ServiceException extends ServerException {
023
024 /**
025 * Creates an service exception using the specified error code.
026 * The exception message is resolved using the error code template
027 * and the passed parameters.
028 *
029 * @param error error code for the XException.
030 * @param params parameters to use when creating the error message
031 * with the error code template.
032 */
033 public ServiceException(XException.ERROR error, Object... params) {
034 super(error, params);
035 }
036
037 }