Offline.js错误消息

I'm using Offline.js library to notify users when they lost internet connectivity. Currently this library intercepts every AJAX request and decides if user have a connection.

Here's a function which is automatically called when connectivity is lost:

Offline.on('down', function () {
    alert('A network error has occurred.');
});

I was wondering if there is any chance to notify users with the actual error message which is logged to console, e.g. net::ERR_CONNECTION_REFUSED or net::ERR_INTERNET_DISCONNECTED?

That should return the error

 Offline.on('down', function (error) {
    alert('A network error has occurred.' + ' ' + error);
});