message: simplified error handling
diff: @@ -246,15 +246,6 @@ impl SQLiteStorageType {
  }
  }
  -macro_rules! match_res_to_item_id {
  - ($res:ident) => {
  - match $res {
  - Err(err) => return Err(IndyError::from(err)),
  - Ok(id) => id
  - }
  - }
  -}
  -
  impl WalletStorage for SQLiteStorage {
  ///
  /// Tries to fetch values and/or tags from the storage.
  @@ -404,10 +395,8 @@ impl WalletStorage for SQLiteStorage {
  fn add_tags(&self, type_: &[u8], id: &[u8], tags: &[Tag]) -> IndyResult<()> {
  let tx: transaction::Transaction = transaction::Transaction::new(&self.conn, rusqlite::TransactionBehavior::Deferred)?;
  - let res = tx.prepare_cached("SELECT id FROM items WHERE type = ?1 AND name = ?2")?
  - .query_row(&[&type_.to_vec(), &id.to_vec()], |row| row.get(0));
  -
  - let item_id: i64 = match_res_to_item_id!(res);
  + let item_id: i64 = tx.prepare_cached("SELECT id FROM items WHERE type = ?1 AND name = ?2")?
  + .query_row(&[&type_.to_vec(), &id.to_vec()], |row| row.get(0))?;
  if !tags.is_empty() {
  let mut enc_tag_insert_stmt = tx.prepare_cached("INSERT OR REPLACE INTO tags_encrypted (item_id, name, value) VALUES (?1, ?2, ?3)")?;
  @@ -428,10 +417,8 @@ impl WalletStorage for SQLiteStorage {
  fn update_tags(&self, type_: &[u8], id: &[u8], tags: &[Tag]) -> IndyResult<()> {
  let tx: transaction::Transaction = transaction::Transaction::new(&self.conn, rusqlite::TransactionBehavior::Deferred)?;
  - let res = tx.prepare_cached("SELECT id FROM items WHERE type = ?1 AND name = ?2")?
  - .query_row(&[&type_.to_vec(), &id.to_vec()], |row| row.get(0));
  -
  - let item_id: i64 = match_res_to_item_id!(res);
  + let item_id: i64 = tx.prepare_cached("SELECT id FROM items WHERE type = ?1 AND name = ?2")?
  + .query_row(&[&type_.to_vec(), &id.to_vec()], |row| row.get(0))?;
  tx.execute("DELETE FROM tags_encrypted WHERE item_id = ?1", &[&item_id])?;
  tx.execute("DELETE FROM tags_plaintext WHERE item_id = ?1", &[&item_id])?;
  