<< back to sysax.com Product page

1.8. Error checking

The ftpresult, mailresult, and fileresult predefined status flags can be used to determine the result of the last executed command. The flags will be set to success if the command completed successfully. Errors may be reported by setting a program exit code, printing an error message, writing out an error file, or even sending out an email message.

Exhibit 1.11. Examples for using some commands for error checking

ftpconnect "127.0.0.1", 21, "anon", "anon@anon.com";
if ftpresult eq success begin
end else begin
end



mailcreate "My name", "me@mydomain.com", "Test mail", "This is a test mail";
if mailresult eq success begin
end else begin
end



fileopen read, "myfile.txt";
if fileresult eq success begin
end else begin
end