.NET to Javascript compiler

C# code   Html page   Start
public class ExceptionApp : HtmlGlobal
{
	public static void Start()
	{
		try
		{
			throw new JException("Test exception 1.", new JException("Test execption 2"));
		}
		catch (JException ex)
		{
			window.Alert(ex.ToString());
		}
		catch
		{
			throw;
		}
	}
}
  
public class JException : Exception
{
	public JException(string message, Exception innerException) : base(message, innerException) 
	{
	}
	public JException(string message)
		: this(message, null)
	{
	}
}

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <meta http-equiv="x-ua-compatible" content="IE=11;IE=10;IE=9;IE=8;IE=7" />
    <script type="text/javascript" language="javascript" src="js/exception.js"></script>
</head>
<body onload="javascript:StartScript()">
	Exception.html: check try/catch/JException.
	Test exception 1 / Test exception 2 has to be displayed.
</body>
</html>
© 2009 JScriptSuite. All rights reserved.