That's an interesting question.
Normally, the compiler guards against catch blocks that can never be entered. But there (apparently) comes a point where that's just not practical.
It's virtually impossible for the compiler to predict what type of code might throw
any type of Exception (including RuntimeException). So basically, the compiler will "look the other way" and let a catch(Exception) block pass, even if the associated try block is empty.
On the other hand, your own class, MyException, is much more specific, so it's much more reasonable for the compiler to check for code that might throw an instance of MyException.
See this
thread:
https://coderanch.com/t/375599/java/java/Exception-class-special