Skip to content

Commit 14ac8f8

Browse files
author
Loki
committed
HuskyUI Safety
1 parent 9a7e6d7 commit 14ac8f8

File tree

1 file changed

+10
-1
lines changed
  • src/main/java/com/codehusky/huskyui/states

1 file changed

+10
-1
lines changed

src/main/java/com/codehusky/huskyui/states/Page.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,12 +415,21 @@ public void setObserver(final Player observer) {
415415
}
416416

417417
public void interrupt(){
418+
System.out.println("-++-\nINTERRUPT\nInterrupt Is Null: " + (this.interrupt == null) + "\nUpdater Task Is Null: " + (this.updaterTask == null));
418419
if(this.interrupt != null) {
419-
this.interrupt.run();
420+
try {
421+
this.interrupt.run();
422+
}catch (Exception e){
423+
HuskyUI.getLogger().error("Error occurred while running HuskyUI Page interrupt.");
424+
e.printStackTrace();
425+
}
426+
System.out.println("Interrupt ran.");
420427
}
421428
if(updaterTask != null) {
422429
updaterTask.cancel();
430+
System.out.println("Updater cancelled");
423431
updaterTask = null;
432+
System.out.println("Updater set to null.");
424433
}
425434
}
426435

0 commit comments

Comments
 (0)