1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-12 11:10:29 +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 class ComputerCraft
if( subResource.exists() ) mounts.add( new FileMount( subResource, 0 ) ); if( subResource.exists() ) mounts.add( new FileMount( subResource, 0 ) );
} }
} }
catch( FileNotFoundException ignored )
{
}
catch( IOException | RuntimeException e ) catch( IOException | RuntimeException e )
{ {
ComputerCraft.log.error( "Could not load resource pack '" + resourcePackName + "'", e ); ComputerCraft.log.error( "Could not load resource pack '" + resourcePackName + "'", e );

View File

@ -69,7 +69,7 @@ public class JarMount implements IMount
// Cleanup any old mounts. It's unlikely that there will be any, but it's best to be safe. // Cleanup any old mounts. It's unlikely that there will be any, but it's best to be safe.
cleanup(); cleanup();
if( !jarFile.exists() || jarFile.isDirectory() ) throw new FileNotFoundException(); if( !jarFile.exists() || jarFile.isDirectory() ) throw new FileNotFoundException( "Cannot find " + jarFile );
// Open the zip file // Open the zip file
try try
@ -85,7 +85,7 @@ public class JarMount implements IMount
if( zip.getEntry( subPath ) == null ) if( zip.getEntry( subPath ) == null )
{ {
zip.close(); 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. // We now create a weak reference to this mount. This is automatically added to the appropriate queue.

View File

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