clean up error message

This commit is contained in:
Ben Fry
2016-06-02 16:36:44 -04:00
parent a433ea82a9
commit 24a316a2bf

View File

@@ -6179,8 +6179,7 @@ public class PApplet implements PConstants {
public PFont createFont(String name, float size,
boolean smooth, char[] charset) {
if (g == null) {
System.err.println("The sketch is not initialized yet.");
throw new RuntimeException("Fonts must be created inside setup() or after it has been called.");
throw new RuntimeException("createFont() can only be used inside setup() or after setup() has been called.");
}
return g.createFont(name, size, smooth, charset);
}