From 2ea2bb5bcd96045f1bd6cb4c3d8b8416dbaa05dc Mon Sep 17 00:00:00 2001 From: Roy Date: Tue, 26 Dec 2017 21:16:15 +0200 Subject: MERGE --- .../Visual_Studio/Tango.Stubs/Stubs/Calculate.cs | 23 ++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'Software/Visual_Studio/Tango.Stubs') diff --git a/Software/Visual_Studio/Tango.Stubs/Stubs/Calculate.cs b/Software/Visual_Studio/Tango.Stubs/Stubs/Calculate.cs index 6afedde96..b0cfc6e08 100644 --- a/Software/Visual_Studio/Tango.Stubs/Stubs/Calculate.cs +++ b/Software/Visual_Studio/Tango.Stubs/Stubs/Calculate.cs @@ -26,15 +26,22 @@ namespace Tango.Stubs.Stubs protected async override Task OnRun(Action multiResponseCallback) { - var response = await Transporter.SendRequest( - new CalculateRequest() - { - A = NumberA, - B = NumberB - } - ); + try + { + var response = await Transporter.SendRequest( + new CalculateRequest() + { + A = NumberA, + B = NumberB + } + ); - return response.Message.Sum.ToString(); + return response.Message.Sum.ToString(); + } + catch (Exception ex) + { + return ex.Message; + } } } } -- cgit v1.3.1