The correct way is not to let the exception occur in the first place.
In most cases a run over the entered string with in or charinset of set of char is enough to validate input against invalid input.
This defeats the purpose of using a TMaskEdit in the first place.
(But, I must admit that for almost any situation there are better controls available.)
Also, TMaskEdit will handle drag+drop/cut/paste for you in such a way that it will obey the EditMask.
If you want to implement such a behaviour as well then "a few lines of code" simply won't do.
Exceptions are very costly and meant for other purposes.
Costly in what sense?
AFAIK I do not have to pay money for exceptions
Probably they cost much more time and overhead than a simple boolean check, but remember this is about user-input, so even if an exception would take 100 ms, it really would not matter at all (unless Superman was behind the keyboard).
Bart