private void notifyErrorListener(Throwable e) {
        Listener listener = getListener();
        if (listener != null) {
            try {
                listener.onRunError(e instanceof Exception ? (Exception) e : new Exception(e));
            } catch (Throwable t) {
                Log.w(TAG, "Exception in onRunError: " + t.getMessage(), t);
            }
        }
    }
Notify listener of an error

@param e the exception
usbSerialForAndroid/src/main/java/com/hoho/android/usbserial/util/SerialInputOutputManager.java