mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 21:59:20 +01:00
error message fixes for two internal errors
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user