method of static class JsNgram

Description

Callback function to handle the failure event of ajax and to show error message.

Example
$.ajax(JsNgram.indexFileName(text), JsNgram.ajaxJson).fail(JsNgram.failMessageHandler);
      
Usage

failMessageHandler(xhr, ajaxOptions, thrownError);

Argument xhr is a jQuery jqXHR object. Argument ajaxOptions is a PlainObject that contains options on ajax calling. Argument thrownError is a string that shows the error.

It shows detailed messages on console. Notifies end-user just result was nothing, avoids showing them technical messages.

It is a jQuery ajax callback function for deferred.fail, read the jQeury document for details.