mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Merge branch 'protocol-state-exception' into 'master'
ProtocolStateException for client protocols Methods that implement local actions in a client protocol (for example, accepting an invitation) can throw this exception to indicate that the action wasn't taken because the action isn't applicable to the current state. This can happen if the protocol state machine is updated by an incoming message and the user takes an action before the UI has been updated. See merge request !368
This commit is contained in:
@@ -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 {
|
||||
|
||||
}
|
||||
@@ -6,5 +6,4 @@ package org.briarproject.api.db;
|
||||
*/
|
||||
public class ContactExistsException extends DbException {
|
||||
|
||||
private static final long serialVersionUID = -6658762011691502411L;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -7,5 +7,4 @@ package org.briarproject.api.db;
|
||||
*/
|
||||
public class NoSuchContactException extends DbException {
|
||||
|
||||
private static final long serialVersionUID = -7048538231308207386L;
|
||||
}
|
||||
|
||||
@@ -7,5 +7,4 @@ package org.briarproject.api.db;
|
||||
*/
|
||||
public class NoSuchGroupException extends DbException {
|
||||
|
||||
private static final long serialVersionUID = -5494178507342571697L;
|
||||
}
|
||||
|
||||
@@ -7,5 +7,4 @@ package org.briarproject.api.db;
|
||||
*/
|
||||
public class NoSuchLocalAuthorException extends DbException {
|
||||
|
||||
private static final long serialVersionUID = 494398665376703860L;
|
||||
}
|
||||
|
||||
@@ -7,5 +7,4 @@ package org.briarproject.api.db;
|
||||
*/
|
||||
public class NoSuchMessageException extends DbException {
|
||||
|
||||
private static final long serialVersionUID = 9191508339698803848L;
|
||||
}
|
||||
|
||||
@@ -7,5 +7,4 @@ package org.briarproject.api.db;
|
||||
*/
|
||||
public class NoSuchTransportException extends DbException {
|
||||
|
||||
private static final long serialVersionUID = -6274982612759573100L;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user