123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- goog.provide('goog.net.ErrorCode');
- goog.net.ErrorCode = {
-
- NO_ERROR: 0,
-
- ACCESS_DENIED: 1,
-
- FILE_NOT_FOUND: 2,
-
- FF_SILENT_ERROR: 3,
-
- CUSTOM_ERROR: 4,
-
- EXCEPTION: 5,
-
- HTTP_ERROR: 6,
-
- ABORT: 7,
-
- TIMEOUT: 8,
-
- OFFLINE: 9
- };
- goog.net.ErrorCode.getDebugMessage = function(errorCode) {
- switch (errorCode) {
- case goog.net.ErrorCode.NO_ERROR:
- return 'No Error';
- case goog.net.ErrorCode.ACCESS_DENIED:
- return 'Access denied to content document';
- case goog.net.ErrorCode.FILE_NOT_FOUND:
- return 'File not found';
- case goog.net.ErrorCode.FF_SILENT_ERROR:
- return 'Firefox silently errored';
- case goog.net.ErrorCode.CUSTOM_ERROR:
- return 'Application custom error';
- case goog.net.ErrorCode.EXCEPTION:
- return 'An exception occurred';
- case goog.net.ErrorCode.HTTP_ERROR:
- return 'Http response at 400 or 500 level';
- case goog.net.ErrorCode.ABORT:
- return 'Request was aborted';
- case goog.net.ErrorCode.TIMEOUT:
- return 'Request timed out';
- case goog.net.ErrorCode.OFFLINE:
- return 'The resource is not available offline';
- default:
- return 'Unrecognized error code';
- }
- };
|