diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index a94701d10..78d2854a4 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -3693,6 +3693,15 @@ public class PApplet extends Applet Float floatSize = new Float(size); if (lowerName.endsWith(".otf") || lowerName.endsWith(".ttf")) { + InputStream stream = openStream(name); + if (stream == null) { + System.err.println("The font \"" + name + "\" " + + "is missing or inaccessible, make sure " + + "the URL is valid or that the file has been " + + "added to your sketch and is readable."); + return null; + } + //font = Font.createFont(Font.TRUETYPE_FONT, openStream(name)); Method createFontMethod = Font.class.getMethod("createFont", diff --git a/video/src/processing/video/Capture.java b/video/src/processing/video/Capture.java index b9b205b2c..17e3e2fd5 100755 --- a/video/src/processing/video/Capture.java +++ b/video/src/processing/video/Capture.java @@ -507,11 +507,11 @@ public class Capture extends PImage implements Runnable { int errorCode = qte.errorCode(); if (errorCode == Errors.couldntGetRequiredComponent) { throw new RuntimeException("Couldn't find any capture devices, " + - "check the FAQ for more info."); + "read the video reference for more info."); } else { qte.printStackTrace(); throw new RuntimeException("Problem listing capture devices, " + - "check the FAQ for more info."); + "read the video reference for more info."); } } //return null;