I’m using the WWW class to grab imagery from an ftp server. The ftp server limits the downloads to 5 simultaneously. When I kick off a bunch of requests I handle this gracefully: I have a loop that checks the www progress of each download, and when it detects a 421 error (too many connections) it stops the download, disposes the WWW call, and adds the download to a queue to be restarted when another download finishes. I also catch permanent errors (e.g. file not found) and handle those gracefully.
All of this works perfectly in standalone versions, tested on both Windows and Mac. However, in the webplayer, every time the WWW encounters an ftp error it seems to immediately return it to the browser, which then sends a popup error to the user. The popup is in the following format ([Title:] indicates what’s in the popup titlebar). Each one has a yellow warning icon next to the text.
[Title:]Alert
421 There are too many connections from your internet address.
[Title:]Alert
550 Failed to change directory.
[Title:]Alert
425 failed to establish connection
Since I might kick of 15 of these at a time, I end up spamming the user with 10 popups. Clearly not acceptable.
Any idea how to prevent Unity from sending these to the browser? This is a serious WTF error - why would Unity, a game engine, ever throw an error like this to the browser even if I weren’t handling things gracefully?