| Gentee Programming Language > Documentation > Syntax | Download documentation |
Gentee supports throwing and handling exceptions. Taking advantage of exceptions simplifies an error processing. In particular, using exceptions enables us to avoid checking the returned function values for errors.
if myfunc( a )
{
print( "Error!")
return 0
}
is equivalent to
myfunc( a )
In addition, it would be better to handle a rollback by using exceptions rather than terminate the program abnormally.
exception Exception handler definition. throw Throwing exceptions. finally Termination handling.
Copyright © 2004-2006 Gentee Inc. All rights reserved. |