# Exceptions
You can interrupt the script execution using the throw function:
func main(amount: Int) = {
if (amount > 0)
then
"Done!"
else
throw("Error!")
}
There is no exception handling in Ride: after an exception has been thrown, the script execution fails. The transaction can be either discarded or saved on the blockchain as failed, see the Transaction Validation article for details.