Class NFWException

  • All Implemented Interfaces:
    Serializable

    public class NFWException
    extends GeneralException
    For "No F-ing Way" Exception. Normally these should never arise unless there is some internal inconsistency in the server. Checks for these effectively give regression information should things that always work suddenly stop. I suppose these might be called "InternalException" or some such, but that is over-used and less informative.

    Usage

    When coding, if you have a situation that should not occur, throw one of these. For instance, if you have to catch an EncodingException but that should never, every actually happen, catch it and rethrow with an NFWException. This means that at some point in the future, if something internal in the code changes, you might get one of these and will know that some basic contract or functionality of the software has been altered. For software with an expected very long lifetime (years if not decades) this can become invaluable at finding errors, especially if the maintainers of the code are long gone. It is very good the ensure the code will tell you things change.

    Created by Jeff Gaynor
    on 3/17/14 at 1:02 PM

    See Also:
    Serialized Form
    • Constructor Detail

      • NFWException

        public NFWException()
      • NFWException

        public NFWException​(Throwable cause)
      • NFWException

        public NFWException​(String message)