about summary refs log tree commit diff
path: root/pkgs/by-name/to/torrentstream/0001-display-the-message-of-caught-exceptions.patch
blob: 3e21bb0530bdf9db7328f25cdc136a67ffd369c8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
diff --git a/Program.cs b/Program.cs
index 5697d79..7cfba20 100644
--- a/Program.cs
+++ b/Program.cs
@@ -79,6 +79,8 @@ app.MapGet ( "/proxyvideolist", ProxyHandler.ProxyVideolist );
 app.MapGet ( "/proxyvideopart", ProxyHandler.ProxyVideoPart );
 app.MapGet ( "/playerws", ExternalPlayer.ExternalWebSocket );
 
+Console.WriteLine ($"BaseFolder: {GlobalConfiguration.BaseFolder}");
+
 await TorrentHandler.LoadState ();
 
 app.Run ();
diff --git a/StreamHandler.cs b/StreamHandler.cs
index 43aa61c..7d26681 100644
--- a/StreamHandler.cs
+++ b/StreamHandler.cs
@@ -110,7 +110,8 @@ namespace TorrentStream {
                     context.Response.StatusCode = 302;
                     context.Response.Headers.Location = ( RuntimeInformation.IsOSPlatform ( OSPlatform.Windows ) ? "file:///" : "file://" ) + currentFile.FullPath;
                 }
-            } catch {
+            } catch (Exception e) {
+                Console.WriteLine($"Exception caught: {e.Message}");
                 context.Response.StatusCode = 500;
             }
         }
@@ -192,7 +193,8 @@ namespace TorrentStream {
                 }
                 context.Response.StatusCode = 200;
                 await context.Response.WriteAsync ( "Downloading started" );
-            } catch {
+            } catch (Exception e) {
+                Console.WriteLine($"Exception caught: {e.Message}");
                 context.Response.StatusCode = 500;
             }
         }