2

Using http://processing.org/ I'm getting different errors in console on running application like this

Element '#text' not know. Ignoring it.
Element '#text' not know. Ignoring it.
Attribute 'stroke-miterlimit' not known.  Ignoring it.
Attribute 'stroke-dasharray' not known.  Ignoring it.
Element '#text' not know. Ignoring it.
...
...

How to disable this output?

Crystal
  • 345
  • 2
  • 12

2 Answers2

2

You need to use pure Java to disable the error messages. If they appear red in the Processing console, you can get rid of them like this:

import java.io.PrintStream;
import java.io.OutputStream;

void setup(){
  System.err.println("Error 1"); // will be printed
  System.setErr(new PrintStream(new OutputStream() {
      public void write(int b) {
      }
  }));
  System.err.println("Error 2"); // will not be printed
}

If the error message text is grey, use this (note: println() will not work anymore):

import java.io.PrintStream;
import java.io.OutputStream;

void setup(){
  println("Error 1"); // will be printed
  System.setOut(new PrintStream(new OutputStream() {
      public void write(int b) {
      }
  }));
  println("Error 2"); // will not be printed
}
Pwdr
  • 3,712
  • 4
  • 28
  • 38
1

I think it is Geomerative library errors, but I am not sure so far how to disable them. In my case I have

"Element #text' not know. Ignoring it.

error when I load SVG file (which has only <g> and <path> elements).

I checked Geomerative and it wasn't it's fault. The Geomerative library is honestly parsing svg tags and displays this error message only if it encounters rubbish or unsupported tag.

The problem was in loadXML() which would incorrectly return child elements (incorrectly, meaning that on top of returning real xml elements, it would return element which is not really in file, namely '#text'. I think this bug is fixed in versions above 2.0b9. (At some point this #text was even in the loadXML() example on processing API reference page. But they fixed it by now.

Braiam
  • 1
  • 11
  • 47
  • 78
Dimitry K
  • 2,236
  • 1
  • 28
  • 37
  • 1
    yes, maybe this is the problem! i am also loading svg into the program. but i need a way to disable warning console entirely – Crystal Jun 11 '13 at 13:14