added on_exit arg to tryLast()
This commit is contained in:
@@ -43,23 +43,23 @@ void test_dtsod(){
|
||||
char* s;
|
||||
|
||||
optime("deserialize",1,
|
||||
tryLast(DtsodV24_deserialize(text),r)
|
||||
tryLast(DtsodV24_deserialize(text),r,;)
|
||||
dtsod=r.value.VoidPtr;
|
||||
);
|
||||
print_dtsod(dtsod);
|
||||
|
||||
optime("serialize",1,
|
||||
tryLast(DtsodV24_serialize(dtsod),r)
|
||||
tryLast(DtsodV24_serialize(dtsod),r,;)
|
||||
s=r.value.VoidPtr;
|
||||
);
|
||||
DtsodV24_free(dtsod);
|
||||
kprintf("\e[92m%s",s);
|
||||
|
||||
optime("reserialize",10,
|
||||
tryLast(DtsodV24_deserialize(s),r)
|
||||
tryLast(DtsodV24_deserialize(s),r,;)
|
||||
dtsod=r.value.VoidPtr;
|
||||
free(s);
|
||||
tryLast(DtsodV24_serialize(dtsod),rr)
|
||||
tryLast(DtsodV24_serialize(dtsod),rr,;)
|
||||
s=rr.value.VoidPtr;
|
||||
DtsodV24_free(dtsod);
|
||||
);
|
||||
|
||||
@@ -15,7 +15,7 @@ Maybe throw_errcode(){
|
||||
|
||||
Maybe test_maybe(){
|
||||
kprintf("\e[94mdont_throw returns \e[92m");
|
||||
tryLast(dont_throw(),rez0)
|
||||
tryLast(dont_throw(),rez0,;)
|
||||
printMaybe(rez0);
|
||||
kprintf("\n");
|
||||
try(throw_error(),rez1,;)
|
||||
|
||||
Reference in New Issue
Block a user