From f9db9aa632161c0a6299545f860b87f077372b16 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 13 Mar 2021 13:32:38 +0100 Subject: [PATCH] Remove misplaced try catch block --- lib/helpers/conversations_helper.dart | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/lib/helpers/conversations_helper.dart b/lib/helpers/conversations_helper.dart index f739794..9a286b9 100644 --- a/lib/helpers/conversations_helper.dart +++ b/lib/helpers/conversations_helper.dart @@ -148,21 +148,16 @@ class ConversationsHelper { /// Get information about a single conversation specified by its [id] Future _downloadSingle(int id) async { - try { - final response = await APIRequest( - uri: "conversations/get_single", - needLogin: true, - args: {"conversationID": id.toString()}).execWithThrow(); + final response = await APIRequest( + uri: "conversations/get_single", + needLogin: true, + args: {"conversationID": id.toString()}).execWithThrow(); - final conversation = apiToConversation(response.getObject()); + final conversation = apiToConversation(response.getObject()); - await ConversationsSerializationHelper() - .insertOrReplaceElement((c) => c.id == conversation.id, conversation); - return conversation; - } on Exception catch (e, s) { - print("Could not get information about a single conversation ! $e => $s"); - return null; - } + await ConversationsSerializationHelper() + .insertOrReplaceElement((c) => c.id == conversation.id, conversation); + return conversation; } /// Get information about a conversation. If [force] is set to false, a