It is up to you (inside the script) to handle any errors. Commands always return success or failure when the exit, and you can intercept this and take action accordingly.
Shell assigns the exit status of the last command to variable "?".
So, at any point you can see if the last command (that includes ftp) succeeded or failed. Just enter in a terminal screen "echo $?" to see what I mean. The result of 0 means the last command you executed succeeded. The result of anything else, means the last command failed.