tdscott10 / Tetris

SER216 Final Project
0 stars 0 forks source link

Tetris.java generic exceptions #19

Closed ghost closed 8 years ago

ghost commented 8 years ago

Line 312: try-catch block is catching general exceptions (NullPointerException, RuntimeException, Exception)

ghost commented 8 years ago

I am not entirely sure what the specific exceptions are that might be found here other than the general ones, so I don't know what would make sense to try and catch. / * Sleep to cap the framerate. / long delta = (System.nanoTime() - start) / 1000000L; if(delta < FRAME_TIME) { try { Thread.sleep(FRAME_TIME - delta); } catch(Exception e) { //e.printStackTrace(); LOGGER.log("context", e); //change printStackTrace to Logger call

ghost commented 8 years ago

Decision made to leave this code as is since it is unknown what the original authors were trying to catch.