diff options
| author | Roy <roy.mail.net@gmail.com> | 2017-12-26 21:16:15 +0200 |
|---|---|---|
| committer | Roy <roy.mail.net@gmail.com> | 2017-12-26 21:16:15 +0200 |
| commit | 2ea2bb5bcd96045f1bd6cb4c3d8b8416dbaa05dc (patch) | |
| tree | a21ff27fff08876e835df82c5242def1f0d09c17 /Software/Visual_Studio/Tango.Stubs | |
| parent | 6450fc175114a6f8d0b75cb21386d1bb0c902711 (diff) | |
| download | Tango-2ea2bb5bcd96045f1bd6cb4c3d8b8416dbaa05dc.tar.gz Tango-2ea2bb5bcd96045f1bd6cb4c3d8b8416dbaa05dc.zip | |
MERGE
Diffstat (limited to 'Software/Visual_Studio/Tango.Stubs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Stubs/Stubs/Calculate.cs | 23 |
1 files changed, 15 insertions, 8 deletions
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<string> OnRun(Action<String> multiResponseCallback) { - var response = await Transporter.SendRequest<CalculateRequest, CalculateResponse>( - new CalculateRequest() - { - A = NumberA, - B = NumberB - } - ); + try + { + var response = await Transporter.SendRequest<CalculateRequest, CalculateResponse>( + new CalculateRequest() + { + A = NumberA, + B = NumberB + } + ); - return response.Message.Sum.ToString(); + return response.Message.Sum.ToString(); + } + catch (Exception ex) + { + return ex.Message; + } } } } |
