Question: Stop execution on error

How do I stop maple from running the rest of the worksheet in case an error occurs in the middle of it? Which command should I use?

More specifically, I have a program in which I input the masses of the particles and then the program will calculate the corresponding parameters of the potential, and will do a lot of other stuff with these parameters. However, it these parameters happen to be complex, the program should simply halt with a warning: "your parameters are complex, cannot continue".

I have used the "error" command and interface(errorbreak=2), but does not work. I am really astounded that no simple command such as "stop" or "halt" exists for this purpose.

Thanks for your help!

Please Wait...