mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
Print stacktraces on any errors.
This commit is contained in:
parent
3d030b6968
commit
cf9d1cd8cf
2 changed files with 11 additions and 10 deletions
|
@ -1,6 +1,5 @@
|
|||
package me.kavin.piped;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Timer;
|
||||
|
@ -49,7 +48,7 @@ public class Main {
|
|||
Session sess = DatabaseSessionFactory.createSession();
|
||||
try {
|
||||
ResponseHelper.subscribePubSub(channelId, sess);
|
||||
} catch (IOException | InterruptedException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
sess.close();
|
||||
|
|
|
@ -609,13 +609,15 @@ public class ResponseHelper {
|
|||
sess.save(channel);
|
||||
sess.beginTransaction().commit();
|
||||
|
||||
try {
|
||||
Session sessSub = DatabaseSessionFactory.createSession();
|
||||
subscribePubSub(channelId, sessSub);
|
||||
sessSub.close();
|
||||
} catch (IOException | InterruptedException e) {
|
||||
ExceptionUtils.rethrow(e);
|
||||
}
|
||||
Multithreading.runAsync(() -> {
|
||||
try {
|
||||
Session sessSub = DatabaseSessionFactory.createSession();
|
||||
subscribePubSub(channelId, sessSub);
|
||||
sessSub.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
|
||||
for (StreamInfoItem item : info.getRelatedItems()) {
|
||||
long time = item.getUploadDate() != null
|
||||
|
@ -822,7 +824,7 @@ public class ResponseHelper {
|
|||
Session sessSub = DatabaseSessionFactory.createSession();
|
||||
subscribePubSub(channelId, sessSub);
|
||||
sessSub.close();
|
||||
} catch (IOException | InterruptedException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue