﻿var ErrorHandler = function() {
}

ErrorHandler.TechnicalError = function(error) {
    // the actual error is a exception or a communication error.
    // if it is a network error, it might be interesting to notify the user that his network might have a problem.
    // otherwise, the user doesn't need to know what the actual error is.

    if (typeof error.responseText == 'undefined') {
        alert("Désolé, une erreur s'est produite sur Saturneo.Net.\r\n" +
        "Nous faisons tout notre possible pour rétablir la situation au plus vite.\r\n" +
        "\r\n" +
        "Saturneo.Net" +
        "\r\n" +
        "\r\n" + error);
    }
    else {
        DialogboxError.ShowModal($('#globalError'), error.responseText);
    }
}

ErrorHandler.NotImplemented =function(){
    alert("Pas encore implémenté.")
}
