Sha256: 4af8f43824bc1df324b3b3ef3062566000d6d0d9ee4f75db3010afa13bf0cf9d
Contents?: true
Size: 1.08 KB
Versions: 6
Compression:
Stored size: 1.08 KB
Contents
Index: core/src/processing/core/PApplet.java =================================================================== --- core/src/processing/core/PApplet.java (revision 5371) +++ core/src/processing/core/PApplet.java (working copy) @@ -1386,7 +1386,22 @@ } catch (RendererChangeException e) { // Give up, instead set the new renderer and re-attempt setup() return; + + // Catch a JRuby exception so that the RendererChangeExceptions + // that we're looking for don't get stuck in Ruby-space. + } catch (RuntimeException e) { + String message = e.getMessage(); + String name = RendererChangeException.class.getName(); + String regex = "(?s).*" + name + ".*"; + regex = regex.replace("$", "\\$"); + if (message != null && message.matches(regex)) { + // Give up, instead set the new renderer and re-attempt setup() + return; + } else { + throw e; + } } + this.defaultSize = false; } else { // frameCount > 0, meaning an actual draw()
Version data entries
6 entries across 6 versions & 1 rubygems