Search in sources :

Example 1 with DeviceNotFoundException

use of com.genonbeta.TrebleShot.exception.DeviceNotFoundException in project TrebleShot by genonbeta.

the class TransferInstance method initialize.

protected void initialize(AccessDatabase database, int groupId) throws TransactionGroupNotFoundException, DeviceNotFoundException {
    mGroup = new TransactionObject.Group(groupId);
    try {
        database.reconstruct(mGroup);
    } catch (Exception e) {
        throw new TransactionGroupNotFoundException();
    }
    mDevice = new NetworkDevice(mGroup.deviceId);
    try {
        database.reconstruct(mDevice);
    } catch (Exception e) {
        throw new DeviceNotFoundException();
    }
}
Also used : TransactionGroupNotFoundException(com.genonbeta.TrebleShot.exception.TransactionGroupNotFoundException) DeviceNotFoundException(com.genonbeta.TrebleShot.exception.DeviceNotFoundException) DeviceNotFoundException(com.genonbeta.TrebleShot.exception.DeviceNotFoundException) TransactionGroupNotFoundException(com.genonbeta.TrebleShot.exception.TransactionGroupNotFoundException) ConnectionNotFoundException(com.genonbeta.TrebleShot.exception.ConnectionNotFoundException)

Aggregations

ConnectionNotFoundException (com.genonbeta.TrebleShot.exception.ConnectionNotFoundException)1 DeviceNotFoundException (com.genonbeta.TrebleShot.exception.DeviceNotFoundException)1 TransactionGroupNotFoundException (com.genonbeta.TrebleShot.exception.TransactionGroupNotFoundException)1