mirror of
https://github.com/Qortal/qortal.git
synced 2025-07-20 03:11:21 +00:00
no longer repackaging missing data exceptions as io exceptions when loading json data for indices
This commit is contained in:
parent
47e313067f
commit
89236d6504
@ -111,6 +111,8 @@ public class ArbitraryIndexUtils {
|
|||||||
|
|
||||||
indexDetails.add( new ArbitraryDataIndexDetail(indexResource.name, rank, indices.get(rank - 1), indexResource.identifier ));
|
indexDetails.add( new ArbitraryDataIndexDetail(indexResource.name, rank, indices.get(rank - 1), indexResource.identifier ));
|
||||||
}
|
}
|
||||||
|
} catch (MissingDataException e) {
|
||||||
|
LOGGER.warn( e.getMessage() );
|
||||||
} catch (InvalidFormatException e) {
|
} catch (InvalidFormatException e) {
|
||||||
LOGGER.debug("invalid format, skipping: " + indexResource);
|
LOGGER.debug("invalid format, skipping: " + indexResource);
|
||||||
} catch (UnrecognizedPropertyException e) {
|
} catch (UnrecognizedPropertyException e) {
|
||||||
@ -191,7 +193,7 @@ public class ArbitraryIndexUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getJson(String name, String identifier) throws IOException {
|
public static String getJson(String name, String identifier) throws IOException, MissingDataException {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ArbitraryDataReader arbitraryDataReader
|
ArbitraryDataReader arbitraryDataReader
|
||||||
@ -209,7 +211,7 @@ public class ArbitraryIndexUtils {
|
|||||||
} catch (MissingDataException e) {
|
} catch (MissingDataException e) {
|
||||||
if (attempts > maxAttempts) {
|
if (attempts > maxAttempts) {
|
||||||
// Give up after 5 attempts
|
// Give up after 5 attempts
|
||||||
throw new IOException("Data unavailable. Please try again later.");
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user