例外処理のログをとるためのSTLogオブジェクト

http://dhr.at.infoseek.co.jp/workingvml.html
コードの40行目あたりに、

var stlog = new STLog();
function STLog(){
 this.p = document.createElement("div");
 this.p.innerHTML = "<h1>例外処理のログ</h1>";
 document.body.insertBefore(this.p,document.body.firstChild);
 return this;
}
STLog.prototype.add = function(e,code){
 this.p.innerHTML += "<p>"+code+":"+e.message+"</p>";
}

とSTLogオブジェクトを追加しました。これで、例外処理の記録をとっていくつもりです。