- Be specific, catch `FatalException` in `enqueue(TaggedMessage)`
- Be specific, catch `InterruptedException` and `FatalException` seperately
This commit is contained in:
Tristan B. Velloza Kildaire 2023-06-13 17:43:39 +02:00
parent 3ff4519d99
commit ddcad89d00
1 changed files with 6 additions and 2 deletions

View File

@ -109,7 +109,7 @@ public class Queue
// TODO: Make us wait on the event (optional with a time-out)
event.notifyAll();
}
catch(SnoozeError snozErr)
catch(FatalException snozErr)
{
// TODO: Add error handling for libsnooze exceptions here
}
@ -148,7 +148,11 @@ public class Queue
// TODO: Make us wait on the event (optional with a time-out)
event.wait();
}
catch(SnoozeError snozErr)
catch(InterruptedException e)
{
// TODO: Add code here which would retry the wait
}
catch(FatalException fatalErr)
{
// TODO: Add error handling for libsnooze exceptions here
}