|
1 | | -using Buttplug.Components.Controls; |
2 | | -using Buttplug.Components.WebsocketServer; |
3 | | -using Buttplug.Core; |
4 | | -using Buttplug.Server; |
5 | | -using JetBrains.Annotations; |
6 | | -using Microsoft.Win32; |
7 | | -using System; |
| 1 | +using System; |
8 | 2 | using System.Collections.ObjectModel; |
9 | 3 | using System.Net; |
10 | 4 | using System.Net.NetworkInformation; |
11 | 5 | using System.Net.Sockets; |
| 6 | +using System.Security.Cryptography; |
12 | 7 | using System.Timers; |
13 | 8 | using System.Windows; |
14 | 9 | using System.Windows.Controls; |
| 10 | +using Buttplug.Components.Controls; |
| 11 | +using Buttplug.Components.WebsocketServer; |
| 12 | +using Buttplug.Core; |
| 13 | +using Buttplug.Server; |
| 14 | +using JetBrains.Annotations; |
| 15 | +using Microsoft.Win32; |
15 | 16 | using Windows.UI.Notifications; |
16 | 17 |
|
17 | 18 | namespace Buttplug.Apps.WebsocketServerGUI |
@@ -107,6 +108,7 @@ private void WebSocketExceptionHandler(object aObj, [NotNull] UnhandledException |
107 | 108 | { |
108 | 109 | errorMessage += "\n\nIf your connection is working, you can ignore this message. Otherwise, this could mean that the client/browser has not accepted our SSL certificate. Try hitting the test button on the \"Websocket Server\" tab."; |
109 | 110 | } |
| 111 | + |
110 | 112 | _currentExceptionMessage = errorMessage; |
111 | 113 | _log.LogException(aEx.ExceptionObject as Exception, true, errorMessage); |
112 | 114 | } |
@@ -204,8 +206,11 @@ public void StartServer() |
204 | 206 | } |
205 | 207 | catch (SocketException e) |
206 | 208 | { |
207 | | - _log.LogException(e); |
208 | | - MessageBox.Show(e.Message, "Buttplug Error", MessageBoxButton.OK, MessageBoxImage.Exclamation); |
| 209 | + _log.LogException(e, true, e.Message); |
| 210 | + } |
| 211 | + catch (CryptographicException e) |
| 212 | + { |
| 213 | + _log.LogException(e, true, e.Message); |
209 | 214 | } |
210 | 215 | } |
211 | 216 |
|
|
0 commit comments