MCPcopy Create free account
hub / github.com/breck7/scroll / _fnLog

Function _fnLog

external/.datatables.js:5808–5834  ·  view source on GitHub ↗

* Log an error message * @param {object} settings dataTables settings object * @param {int} level log error messages, or display them to the user * @param {string} msg error message * @param {int} tn Technical note id to get more information about the error. * @memberof DataTable#oApi

(settings, level, msg, tn)

Source from the content-addressed store, hash-verified

5806 * @memberof DataTable#oApi
5807 */
5808 function _fnLog(settings, level, msg, tn) {
5809 msg = "DataTables warning: " + (settings ? "table id=" + settings.sTableId + " - " : "") + msg
5810
5811 if (tn) {
5812 msg += ". For more information about this error, please see " + "https://datatables.net/tn/" + tn
5813 }
5814
5815 if (!level) {
5816 // Backwards compatibility pre 1.10
5817 var ext = DataTable.ext
5818 var type = ext.sErrMode || ext.errMode
5819
5820 if (settings) {
5821 _fnCallbackFire(settings, null, "dt-error", [settings, tn, msg], true)
5822 }
5823
5824 if (type == "alert") {
5825 alert(msg)
5826 } else if (type == "throw") {
5827 throw new Error(msg)
5828 } else if (typeof type == "function") {
5829 type(settings, tn, msg)
5830 }
5831 } else if (window.console && console.log) {
5832 console.log(msg)
5833 }
5834 }
5835
5836 /**
5837 * See if a property is defined on one object, if so assign it to the other object

Callers 8

DataTableFunction · 0.85
_fnGetCellDataFunction · 0.85
_fnCreateTrFunction · 0.85
getFeatureFunction · 0.85
callbackFunction · 0.85
_fnBuildAjaxFunction · 0.85
_fnPageChangeFunction · 0.85
.datatables.jsFile · 0.85

Calls 3

_fnCallbackFireFunction · 0.85
typeFunction · 0.85
logMethod · 0.80

Tested by

no test coverage detected