public void closeScanner(String scanner) throws UnknownScanner, TException {
UUID uuid = null;
try {
uuid = UUID.fromString(scanner);
} catch (IllegalArgumentException e) {
throw new UnknownScanner(e.getMessage());
}
try {
if (scannerCache.asMap().remove(uuid) == null) {
throw new UnknownScanner("Scanner never existed or no longer exists");
}
} catch (UnknownScanner e) {
throw e;
} catch (Exception e) {
throw new TException(e.toString());