Hi Bjornke, I just tried a simple assert/assertError. If the assert fails, the commands in the assertError message handler are executed then the original handler still continues to execute, so assert exits the handler to the assertError message handler , then goes back to the original handler.
Pete lcSQL Software <http://www.lcsql.com> Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html> On Fri, Feb 21, 2014 at 7:36 AM, Björnke von Gierke <b...@mac.com> wrote: > 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 > _______________________________________________ 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