1ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana/* 2ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana * Copyright (C) 2009 The Android Open Source Project 3ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana * 4ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana * Licensed under the Apache License, Version 2.0 (the "License"); 5ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana * you may not use this file except in compliance with the License. 6ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana * You may obtain a copy of the License at 7ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana * 8ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana * http://www.apache.org/licenses/LICENSE-2.0 9ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana * 10ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana * Unless required by applicable law or agreed to in writing, software 11ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana * distributed under the License is distributed on an "AS IS" BASIS, 12ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana * See the License for the specific language governing permissions and 14ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana * limitations under the License. 15ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana */ 16ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana 17ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintanapackage android.content; 18ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana 19ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana/** 20ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana * Thrown when an application of a {@link ContentProviderOperation} fails due the specified 21ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana * constraints. 22ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana */ 23ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintanapublic class OperationApplicationException extends Exception { 2456f67d21459ad3f136c73c8932904d4a495989c0Fred Quintana private final int mNumSuccessfulYieldPoints; 2556f67d21459ad3f136c73c8932904d4a495989c0Fred Quintana 26ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana public OperationApplicationException() { 27ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana super(); 2856f67d21459ad3f136c73c8932904d4a495989c0Fred Quintana mNumSuccessfulYieldPoints = 0; 29ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana } 30ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana public OperationApplicationException(String message) { 31ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana super(message); 3256f67d21459ad3f136c73c8932904d4a495989c0Fred Quintana mNumSuccessfulYieldPoints = 0; 33ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana } 34ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana public OperationApplicationException(String message, Throwable cause) { 35ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana super(message, cause); 3656f67d21459ad3f136c73c8932904d4a495989c0Fred Quintana mNumSuccessfulYieldPoints = 0; 37ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana } 38ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana public OperationApplicationException(Throwable cause) { 39ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana super(cause); 4056f67d21459ad3f136c73c8932904d4a495989c0Fred Quintana mNumSuccessfulYieldPoints = 0; 4156f67d21459ad3f136c73c8932904d4a495989c0Fred Quintana } 4256f67d21459ad3f136c73c8932904d4a495989c0Fred Quintana public OperationApplicationException(int numSuccessfulYieldPoints) { 4356f67d21459ad3f136c73c8932904d4a495989c0Fred Quintana super(); 4456f67d21459ad3f136c73c8932904d4a495989c0Fred Quintana mNumSuccessfulYieldPoints = numSuccessfulYieldPoints; 4556f67d21459ad3f136c73c8932904d4a495989c0Fred Quintana } 4656f67d21459ad3f136c73c8932904d4a495989c0Fred Quintana public OperationApplicationException(String message, int numSuccessfulYieldPoints) { 4756f67d21459ad3f136c73c8932904d4a495989c0Fred Quintana super(message); 4856f67d21459ad3f136c73c8932904d4a495989c0Fred Quintana mNumSuccessfulYieldPoints = numSuccessfulYieldPoints; 4956f67d21459ad3f136c73c8932904d4a495989c0Fred Quintana } 5056f67d21459ad3f136c73c8932904d4a495989c0Fred Quintana 5156f67d21459ad3f136c73c8932904d4a495989c0Fred Quintana public int getNumSuccessfulYieldPoints() { 5256f67d21459ad3f136c73c8932904d4a495989c0Fred Quintana return mNumSuccessfulYieldPoints; 53ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana } 54ce31b2361db630cf1347fa42dd77e610a4eeb96dFred Quintana} 55