Return a constructed exception from utility method instead of throwing it
@@ -160,7 +160,7 @@ public class HiveFileIterator
{
namenodeStats.getRemoteIteratorNext().recordException(exception);
if (exception instanceof FileNotFoundException) {
- throw new PrestoException(HIVE_FILE_NOT_FOUND, "Partition location does not exist: " + path);
+ return new PrestoException(HIVE_FILE_NOT_FOUND, "Partition location does not exist: " + path);
}
return new PrestoException(HIVE_FILESYSTEM_ERROR, "Failed to list directory: " + path, exception);
}
