A modest Java proposal: NationalSecurityException

class NationalSecurityException extends SecurityException;

When a NationalSecurityException is thrown, the catch clause may access any data, regardless of permissions. This applies only to a catch clause which is in the function that threw the exception.

Should any other function catch a NationalSecurityException, it is expected to ignore it and proceed as if it never happened. Specifically, it is not permitted to throw an IllegalStateException or IllegalAccessException after catching a NationalSecurityException. Any attempt to do so will result in a WhistleblowerException.

I got the idea for this from a Tweet for a bug fix that sounded oddly like a political proposal:


Posted in General. Tags: , , . Comments Off on A modest Java proposal: NationalSecurityException