1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-24 06:03:28 +00:00

Remove a couple of over-eager error logs

This commit is contained in:
SquidDev 2019-04-16 10:08:12 +01:00
parent 5a8a111857
commit 9e9f199e55
3 changed files with 8 additions and 6 deletions

View File

@ -449,6 +449,9 @@ public static IMount createResourceMount( Class<?> modClass, String domain, Stri
if( subResource.exists() ) mounts.add( new FileMount( subResource, 0 ) );
}
}
catch( FileNotFoundException ignored )
{
}
catch( IOException | RuntimeException e )
{
ComputerCraft.log.error( "Could not load resource pack '" + resourcePackName + "'", e );

View File

@ -69,7 +69,7 @@ public JarMount( File jarFile, String subPath ) throws IOException
// Cleanup any old mounts. It's unlikely that there will be any, but it's best to be safe.
cleanup();
if( !jarFile.exists() || jarFile.isDirectory() ) throw new FileNotFoundException();
if( !jarFile.exists() || jarFile.isDirectory() ) throw new FileNotFoundException( "Cannot find " + jarFile );
// Open the zip file
try
@ -85,7 +85,7 @@ public JarMount( File jarFile, String subPath ) throws IOException
if( zip.getEntry( subPath ) == null )
{
zip.close();
throw new IOException( "Zip does not contain path" );
throw new FileNotFoundException( "Zip does not contain path" );
}
// We now create a weak reference to this mount. This is automatically added to the appropriate queue.

View File

@ -64,12 +64,11 @@ private static int getNextID( File location, boolean directory )
{
try
{
int number = Integer.parseInt( content );
id = Math.max( number + 1, id );
id = Math.max( Integer.parseInt( content ) + 1, id );
}
catch( NumberFormatException e )
catch( NumberFormatException ignored )
{
ComputerCraft.log.error( "Unexpected file '" + content + "' in '" + location.getAbsolutePath() + "'", e );
// Skip files which aren't numbers
}
}
}