Alright, thanks everyone for explaining this. I see now that assert does 
something that existing capabilities didn't do: Make your own errors up.

I still think that adding an assert command (of all things) is a completely 
wrong way to do that tho. What i'd want is this to use existing capabilities, 
instead of sidestepping how things work right now. Maybe a control structure 
would be a lot more in touch with the existing ways?

Another approach could be something similar to exit (exit to error?), coupled 
with an operator or a function. I think a command is extremely weird, why would 
a random command exit the handler? it's so weird :(

In addition I'd use it directly with the existing (if weirdly named) 
errorDialog message (assertError synonym?). In fact that one already does 
everything the newfangled assert does (including the global that Richard asked 
for, if I read "the lockErrorDialogs" correctly), the only thing it doesn't do, 
is to allow the user to issue custom errors that would trigger the function, 
but of course that can be added. 

So my suggestion would be to update errorDialog, maybe make a synonym for 
people used to other languages. And then add an assert control structure (or 
even just modify try to be able to use it in that way).


-- 

Use an alternative Dictionary viewer:
http://bjoernke.com/bvgdocu/

Chat with other RunRev developers:
http://bjoernke.com/chatrev/



_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to