001/******************************************************************************* 002 * Copyright (c) 2017 Red Hat Inc 003 * All rights reserved. This program and the accompanying materials 004 * are made available under the terms of the Eclipse Public License v1.0 005 * which accompanies this distribution, and is available at 006 * http://www.eclipse.org/legal/epl-v10.html 007 * 008 * Contributors: 009 * Jens Reimann - initial API and implementation 010 *******************************************************************************/ 011package de.dentrassi.varlink.spi; 012 013public class CallErrorException extends RuntimeException { 014 015 private static final long serialVersionUID = 1L; 016 017 private final CallResponse result; 018 019 public CallErrorException(final CallResponse result) { 020 super(result.getError()); 021 this.result = result; 022 } 023 024 public String getError() { 025 return this.result.getError(); 026 } 027 028 public CallResponse getCallResult() { 029 return this.result; 030 } 031 032}