Throw an exception when trying to remove a queue with an id not in use by any queue

This commit is contained in:
Tristan B. Velloza Kildaire 2021-09-09 18:01:14 +02:00
parent 0c43e80cf6
commit df4d479e54
1 changed files with 3 additions and 1 deletions

View File

@ -137,7 +137,9 @@ public final class Manager
}
else
{
/* TODO: Throw an error here */
/* Unlock queue before throwing an exception */
queuesLock.unlock();
throw new TristanableException(this, "Cannot remove a queue with an id not in use");
}
queuesLock.unlock();