ludus/out/goog/net/errorcode.js
2023-11-16 13:22:15 -05:00

35 lines
1.2 KiB
JavaScript

/*TRANSPILED*//*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
'use strict';
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";
}
};