Name a loader error
I wrote a loader class that has a tries
property that indicates how many times to retry loading a url if an error code is returned. For instance with Twitter, the loader would retry loading a method call if a fail whale is returned, since the next call would probably return success.
I specify the many errors that can be dispatched with string constants, so there's XMLLoaderError.IO
, XMLLoaderError.SECURITY
, etc. I'm having trouble thinking of a name for the error dispatched if the number of tries exceeds the tries
property. At first, I thought XMLLoaderError.TRIES_EXCEEDED
, but I'm certain there's something better out there. I considered XMLLoaderError.TIMEOUT
, but timeout is more of a single load e开发者_Go百科rror. Or I can be clever and use XMLLoaderError.TRYOUT
(jk) Any ideas?
Since your other errors indicate the type/genre of error that occurred - ie. "SECURITY" or "IO" - and these are within the XMLLoader context, why not just name it TRY? XMLLoaderError.TRY makes sense to me - or actually, XMLLoaderError.RETRIES probably makes even more sense!
精彩评论