Added ProtocolStateException for client protocols.

This commit is contained in:
akwizgran
2016-10-27 11:47:53 +01:00
parent 8eeaf4e347
commit ca8d3babaa
9 changed files with 16 additions and 11 deletions

View File

@@ -0,0 +1,11 @@
package org.briarproject.api.clients;
import org.briarproject.api.db.DbException;
/**
* Thrown when a database operation is attempted as part of a protocol session
* and the operation is not applicable to the current protocol state.
*/
public class ProtocolStateException extends DbException {
}

View File

@@ -6,5 +6,4 @@ package org.briarproject.api.db;
*/
public class ContactExistsException extends DbException {
private static final long serialVersionUID = -6658762011691502411L;
}

View File

@@ -1,7 +1,8 @@
package org.briarproject.api.db;
/** Thrown when a database operation is attempted and the database is closed. */
/**
* Thrown when a database operation is attempted and the database is closed.
*/
public class DbClosedException extends DbException {
private static final long serialVersionUID = -3679248177625310653L;
}

View File

@@ -2,9 +2,8 @@ package org.briarproject.api.db;
public class DbException extends Exception {
private static final long serialVersionUID = 3706581789209939441L;
public DbException() {}
public DbException() {
}
public DbException(Throwable t) {
super(t);

View File

@@ -7,5 +7,4 @@ package org.briarproject.api.db;
*/
public class NoSuchContactException extends DbException {
private static final long serialVersionUID = -7048538231308207386L;
}

View File

@@ -7,5 +7,4 @@ package org.briarproject.api.db;
*/
public class NoSuchGroupException extends DbException {
private static final long serialVersionUID = -5494178507342571697L;
}

View File

@@ -7,5 +7,4 @@ package org.briarproject.api.db;
*/
public class NoSuchLocalAuthorException extends DbException {
private static final long serialVersionUID = 494398665376703860L;
}

View File

@@ -7,5 +7,4 @@ package org.briarproject.api.db;
*/
public class NoSuchMessageException extends DbException {
private static final long serialVersionUID = 9191508339698803848L;
}

View File

@@ -7,5 +7,4 @@ package org.briarproject.api.db;
*/
public class NoSuchTransportException extends DbException {
private static final long serialVersionUID = -6274982612759573100L;
}