Untitled
public text v1 · immutableusing GLib;
[ErrorDomain]
public enum MyError
{
TEST
}
class Test : Object
{
construct {}
public void app(Error err=null)
{
try {
foo(3);
}
catch( GLib.Error nest)
{
throw new MyError.TEST(nest.message);
}
}
public void foo(int i, Error err=null)
{
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);
}
}
}