From: Changgyu Choi Date: Thu, 26 Jan 2023 00:57:00 +0000 (+0900) Subject: Remove exception handling from _consumeCommnad() X-Git-Tag: accepted/tizen/unified/20230420.153149~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=371036236feb62d7edf1bb67242fec9c5d5255f8;p=platform%2Fcore%2Fappfw%2Ftidl.git Remove exception handling from _consumeCommnad() This patch removes the catch clause so that the parcel parsing error can be propagated to the user code (as an unhandled exception) properly. Change-Id: Id7e7bc1d11061a5140c51fde156873618fde712c Signed-off-by: Changgyu Choi --- diff --git a/idlc/gen/dart_proxy_gen_cb.h b/idlc/gen/dart_proxy_gen_cb.h index 4184c58..4ee55cc 100644 --- a/idlc/gen/dart_proxy_gen_cb.h +++ b/idlc/gen/dart_proxy_gen_cb.h @@ -81,17 +81,13 @@ class extends ProxyBase { } Parcel _consumeCommand(Port port) { - try { - final Parcel parcel = Parcel.fromPort(port); - final int cmd = parcel.readInt32(); - if (cmd != _MethodId.result.id) { - print('Received parcel is invalid. $cmd'); - } - return parcel; - } catch (error) { - print(error.toString()); - return Parcel(); + final Parcel parcel = Parcel.fromPort(port); + final int cmd = parcel.readInt32(); + if (cmd != _MethodId.result.id) { + print('Received parcel is invalid. $cmd'); } + + return parcel; } /// Disposes of registered delegate interface.