sq / JSIL

CIL to Javascript Compiler

Home Page:http://jsil.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot read property 'add_UnhandledException' of undefined

Thejuster opened this issue · comments

Error after starting seen.

http://localhost/MIRE3/VMMORpgmaker,%20Version=3.2.0.0,%20Culture=neutral,%20PublicKeyToken=null.js line 920:
Uncaught TypeError: Cannot read property 'add_UnhandledException' of undefined

UnhandledException is used for detect crash.

my source code:


`currentDomain.UnhandledException += new UnhandledExceptionEventHandler(currentDomain_UnhandledException);

void currentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
Exception a = (Exception)e.ExceptionObject;
string attributi = a.TargetSite.Attributes.ToString(); //Attributi
string modulo = a.TargetSite.Module.Name.ToString(); //Dove si è verificato l'errore
string messaggio = a.Message.ToString();
string sorgente = a.StackTrace.ToString();
string app = Application.ProductName.ToString();
string versione = Application.ProductVersion.ToString();

        //In Ordine
        StreamWriter sw = new StreamWriter(Application.StartupPath + @"\ErrorLog.txt", false);
        sw.Write(app + "&" + versione + "&" + attributi + "&" + modulo + "&" + messaggio + "&" + sorgente);
        sw.Close();
        sw.Dispose();

        Process.Start(Application.StartupPath + @"\MMORpgmakerCrash.exe","crasherror");

    }

`