I use ExitDialog@Unevaluated@Abort[]
If your dialog is unhappily inside a CheckAbort you can go for exceptions like ExitDialog@Unevaluated@Throw["OOOUT", Unique[]] for example.
In this way, tools like TraceDialog become very useful. TraceDialog[code, Message] is something I use often, to see the Stack, the state, etc
Note that this only aborts one level. If you want 2 levels you could do ExitDialog@Unevaluated@ExitDialog@Unevaluated@Abort[]
For a general way to abort all dialogs of any level at once, one could do
Apply[Composition,
ConstantArray[Function[i, ExitDialog@Unevaluated@i, HoldFirst],
DialogLevel[]]][Unevaluated@Abort[]]
ExitDialogis equivalent toReturnin this case? – xzczd Jan 18 '17 at 04:53ExitDialog@Unevaluated@Abort[]andReturn@Unevaluated@Abort[]has the same effect? – xzczd Jan 19 '17 at 05:58Unevaluated@Abort[]so nothing got aborted. – Rojo Jan 20 '17 at 06:08Returnreturns even when run without[...], and theUnevaluateddoesn't work as one would expect. – Rojo Jan 20 '17 at 06:12Unevaluated. – xzczd Jan 20 '17 at 06:31