michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: package org.mozilla.gecko.sync; michael@0: michael@0: import android.content.SyncResult; michael@0: michael@0: public abstract class SyncException extends Exception { michael@0: private static final long serialVersionUID = -6928990004393234738L; michael@0: michael@0: public SyncException() { michael@0: super(); michael@0: } michael@0: michael@0: public SyncException(final Throwable e) { michael@0: super(e); michael@0: } michael@0: michael@0: /** michael@0: * Update sync result statistics with information particular to this michael@0: * exception. michael@0: * michael@0: * @param globalSession michael@0: * current session, or null. michael@0: * @param syncResult michael@0: * Android sync result to update. michael@0: */ michael@0: public void updateStats(GlobalSession globalSession, SyncResult syncResult) { michael@0: // Assume storage error. michael@0: // TODO: this logic is overly simplistic. michael@0: syncResult.databaseError = true; michael@0: } michael@0: }