All errors are handled through the session object. You should check the PSMessages collection to see if there are any errors in your code.
Exit(1) does not rollback iScript transactions. To rollback
in an iScript, you can use the SqlExec built-in function with the
parameter of ROLLBACK (
SQLEXEC("ROLLBACK")) or the MessageBox built-in function with a message error severity
of error. You can also use the built-in function Error, but only if
you are not sending HTML or XML in the error text itself.