All pastes #802999 Raw Edit

Untitled

public text v1 · immutable
#802999 ·published 2007-11-30 20:30 UTC
rendered paste body
using GLib;
[ErrorDomain]
public enum MyError
{
  TEST
}

class Test :  Object
{
  construct {}

  public void app() throws MyError 
  {
    try {
      foo(3);
   } 
   catch( GLib.Error nest)
   {
     throw new MyError.TEST(nest.message);
   }
  }

  public void foo(int i) throws MyError
  {
    if (i>2)
  	 throw new MyError.TEST("i>2 does not work");

		i++;
  }  
  public void main(String []args)
  {
    var test=new Test();

    try {
      test.app();
    } catch(GLib.Error er)
		{
	stdout.printf(er.message);
    }
  }
}