Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using xmlLoader.parseData property supresses errors in the browser #23

Open
BigPhilCombo opened this issue Mar 19, 2015 · 0 comments
Open

Comments

@BigPhilCombo
Copy link

If you set the parseData property then all subsequent errors in the browser do not get output to the console. The following example does the trick

static function main() 
{
    var a:Array<Int> = null;        

    var queue = new LoaderQueue();

    queue.maxLoading = 2; // max concurrent
    queue.ignoreFailures = true; // carry on regardless
    queue.loaded.add(function(event:LoaderEvent<Dynamic>):Void {            
        trace("Loaded");
        a.push(3);//This will not output a runtime error
    }).forType(Complete);

    var xmlLoader = new XmlLoader("xml/project.xml");
    xmlLoader.parseData = function( xmlData:Xml):Xml {          
        return xmlData;
    }

    queue.add( xmlLoader );     
    queue.load();

    a.push(10); //This generates an error as expected
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant