mob/verb/test()
var/http[] = world.Export("http://www.byond.com")
if(!http)
usr << "Failed to connect."
return
Then, the only way to actually retrieve the specific error code would be to set your ".configure debug" to on. Then, you'll get errors like this:
BUG: Http error: HTTP server returned unexpected status: 502 Bad Gateway
if it fails to connect. It'll tell you error code, and the description of what went wrong. This happens for 404, 504, 502, etc. I think there should be some way for world.Export() to access the error in your programming so you can make your program know what course of action to take in case of each error.
There could be an "error" in the associated list returned by world.Export() which would contain the error message, rather than the list being null...though, that might back backwards compatibility. Hm. Any ideas?