module HelloWorld;

using test::*;

var s = 0;

func Update(a : int, b : int) : void
{
	raise "Exception";
}

func Main() : int
{
	var o = new ObservableValue^(0);
	attach(o.ValueChanged, Update);
	o.Value = 1;
	return s;
}

func Main2() : int
{
	try
	{
		var o = new ObservableValue^(0);
		attach(o.ValueChanged, Update);
		o.Value = 1;
		return s;
	}
	catch (ex)
	{
		return -1;
	}
}