warnings.push("ERROR: Failed while loading "+filename+": "+e.getMessage());
logger.error("Failed while loading "+filename+": "+e.getMessage());
    private TileSet unmarshalTilesetFile(InputStream in, String filename)        throws Exception    {        TileSet set = null;        Node tsNode;        Document tsDoc = null;        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();        try {            DocumentBuilder builder = factory.newDocumentBuilder();            //builder.setErrorHandler(new XMLErrorHandler());            tsDoc = builder.parse(in, ".");            String xmlPathSave = xmlPath;            if (filename.indexOf(File.separatorChar) >= 0) {                xmlPath = filename.substring(0,                        filename.lastIndexOf(File.separatorChar) + 1);            }            NodeList tsNodeList = tsDoc.getElementsByTagName("tileset");            for (int itr = 0; (tsNode = tsNodeList.item(itr)) != null; itr++) {                set = unmarshalTileset(tsNode);                if (set.getSource() != null) {                    warnings.push(                            "WARN: Recursive external Tilesets are not supported.");                }                set.setSource(filename);                // NOTE: This is a deliberate break. multiple tilesets per TSX are                // not supported yet (maybe never)...                break;            }            xmlPath = xmlPathSave;        } catch (SAXException e) {            warnings.push("ERROR: Failed while loading "+filename+": "+e.getMessage());            //e.printStackTrace();        }        return set;    }