package info.izumin.android.bletia;

import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.BluetoothGattDescriptor;

/**
 * Created by izumin on 9/14/15.
 */
public class BletiaException extends Exception {

    private final BletiaErrorType mType;
    private BluetoothGattCharacteristic mCharacteristic;
    private BluetoothGattDescriptor mDescriptor;

    public BletiaException(BletiaErrorType type) {
        this(type.getName(), type);
    }

    public BletiaException(BletiaErrorType type, BluetoothGattCharacteristic characteristic) {
        this(type);
        mCharacteristic = characteristic;
    }

    public BletiaException(BletiaErrorType type, BluetoothGattDescriptor descriptor) {
        this(type);
        mDescriptor = descriptor;
    }

    public BletiaException(String detailMessage, BletiaErrorType type) {
        super(detailMessage);
        this.mType = type;
    }

    public BletiaErrorType getType() {
        return mType;
    }

    public BluetoothGattCharacteristic getCharacteristic() {
        return mCharacteristic;
    }

    public BluetoothGattDescriptor getDescriptor() {
        return mDescriptor;
    }
}

@@ -584,36 +584,9 @@
 type
-);%0A        mCharacteristic =
+,
  cha
@@ -588,32 +588,39 @@
 , characteristic
+, null)
 ;%0A    %7D%0A%0A    pub
@@ -712,25 +712,243 @@
    this(type
-)
+, null, descriptor);%0A    %7D%0A%0A    public BletiaException(BletiaErrorType type, BluetoothGattCharacteristic characteristic, BluetoothGattDescriptor descriptor) %7B%0A        this(type);%0A        mCharacteristic = characteristic
 ;%0A        mD

Add new constructor to BletiaException