//try {
//    var a = null;
//    a.value = "Błędna wartość.";
//}
//catch (e) {
//    var props = "";
//    for (var name in e) {
//        props += name + ": " + e[name] + "\n"; 
//    }
//    alert (props);
//}
//finally {
//    alert ("Klauzula finally!");
//}

window.lastExecutionCompletedDate = null;

function fn (param1) {
    if (typeof(param1) === "undefined") {
        debugger;
        var err = new Error();
        err.message = "Nie przekazano parametru param1.";
        err.name = "Brak parametru";
        throw err;
    }
}

try {
    fn();
}
catch (e) { 
    for (var name in e)
    {
        alert(name + e[name]);
    }

}
finally {
    window.lastExecutionCompletedDate = new Date();
}

//function errorHandler (message, errorURL, lineNumber) {
//    var outputMessage = "Komunikat: " + message + "\nURL: " + errorURL + "\nNumer wiersza: " + lineNumber;
//    alert (outputMessage);
//}
//window.onerror = errorHandler;

//var a = null;
//a.value = "Błędna wartość.";

//var  e = new Error();
//e.message = "Błędna wartość";
//e.name = "TestName";
//e.lastIndex = 445434;
//throw e;

