Change error output in GameFrame.draw() to something more explanatory.

This commit is contained in:
Jan Philipp Timme 2014-11-09 11:17:56 +01:00
parent 904e13f4cf
commit 64039fdee7
1 changed files with 4 additions and 4 deletions

View File

@ -99,16 +99,16 @@ public class GameFrame extends JFrame {
bufferedGraphics = (Graphics2D) this.bufferStrategy.getDrawGraphics(); bufferedGraphics = (Graphics2D) this.bufferStrategy.getDrawGraphics();
this.superScreen.doPaint(bufferedGraphics); //Trigger the actual paint routines. this.superScreen.doPaint(bufferedGraphics); //Trigger the actual paint routines.
} catch (Exception e) { } catch (Exception e) {
System.out.println("Hier geht was schief"); System.err.println("Exception in GameFrame.draw() gefangen:");
e.printStackTrace(); e.printStackTrace();
} finally { } finally {
// We are done, dispose the pen and celebrate the result! // We are done, dispose the pen and celebrate the result!
if (bufferedGraphics != null) if (bufferedGraphics != null)
bufferedGraphics.dispose(); bufferedGraphics.dispose();
} }
} while (this.bufferStrategy.contentsRestored()); } while (this.bufferStrategy.contentsRestored()); //Redraw in case the VolatileImage was restored
this.bufferStrategy.show(); this.bufferStrategy.show(); //Show the drawn image
} while (this.bufferStrategy.contentsLost()); } while (this.bufferStrategy.contentsLost()); //Redraw in case the VolatileImage got lost
Toolkit.getDefaultToolkit().sync(); //Tell the OS to update its graphics of the window. Toolkit.getDefaultToolkit().sync(); //Tell the OS to update its graphics of the window.
} }