NETDATA.error = function (code, msg) {
    NETDATA.errorLast.code = code;
    NETDATA.errorLast.message = msg;
    NETDATA.errorLast.datetime = Date.now();