Network Errors—netError()
The error codes returned by netError()
depend on the environment. In Authoring and Projectors, the errors are generated from the INetURL Xtra (Macromedia’s http implementation). In Shockwave, the error codes come from the browser (Netscape or MIE).
Error Handling in Shockwave versus Projectors
During Authoring and from Projectors if you attempt to preLoadNetThing(url)
with a bad URL, netError()
will report an error 4165, "Requested object could not be found.” In Shockwave the same attempt may still return a human-readable HTML page if the server name is valid, but the page is simply missing. The returned HTML text may be, “The requested object could not be found on the server.” Example E-1 detects the situation properly.
Example E-1. Error Handling
property pUrl
property pNetId
on startDownLoad me, url
set pUrl = url
set pNetId = preloadNetThing(pUrl)
end startDownLoad
on checkProgress me
-- Call this periodically
if netDone(pNetId) then
case (netError(pNetId)) of
"OK", 0: importFileInto member "dynamic content", pUrl
otherwise: alert "Error:" && netError(pNetId)
end case
end if
end checkProgress
Table E-6 shows the netError() error codes. Those over 4000 appear to be TCP error codes.
Table E-6. Macromedia NetError() Codes
Code |
Meaning |
---|---|
[a] | |
0 |
“OK” |
1 |
Usually a memory error, but possibly a bus error. |
4 |
“Bad MOA Class”—network Xtras may not be properly installed. Check with the netPresent (not the netPresent() function). |
5 |
“Bad MOA Interface” (see “Bad ... |
Get Lingo in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.