基本の RuntimeException クラスを作成しようとしています。
BaseRuntimeException extends RuntimeException
i18n などの追加機能を備えています。その基本クラスから、RuntimeException のタイプごとに 1 つのクラスを作成したいと考えています。たとえば、
public class SetterWithNullPointerException extends BaseRuntimeException
ただし、どこにスローしてもこのコンパイルエラーが発生しますSetterWithNullPointerException
Unhandled exception type SetterWithNullPointerException
の直接のスーパークラスである RuntimeException を持たないようなもので、SetterWithNullPointerException
RuntimeException のチェックされていない例外プロパティを失います。SetterWithNullPointerException
(から直接継承するかどうかは簡単に確認できますRuntimeExeption
)
私の質問は...とにかくこの周りにあるのですか?BaseRuntimeException
その子にチェックされていない例外プロパティを継承させるために何か特別なものを作成する必要がありますか?
どうもありがとう!マヌー