Question: Stop computations when complex number detected

I think this is a simple thing but I cannot find the solution. I have lots of complicated computations in Maple 2015 (with different functions of different packages), but I need the final result to be real numbers/functions. Is there a way to prevent maple following along with computations if it detects a potential complex number? For example, if in some internal step is taking sqrt(x) it should stop and tell something like: "you must assume x is positive".

Please Wait...