diff options
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; + } } } } |
