001    package org.nakedobjects.applib;
002    
003    /**
004     * Indicates that a problem has occurred within the application, as opposed to within a supporting framework
005     * or system.
006     */
007    public class ApplicationException extends RuntimeException {
008        private static final long serialVersionUID = 1L;
009        private Throwable cause;
010    
011        public ApplicationException(final String msg) {
012            super(msg);
013        }
014    
015        public ApplicationException(final Throwable cause) {
016            this(cause.getMessage());
017            this.cause = cause;
018        }
019    
020        public ApplicationException(final String msg, final Throwable cause) {
021            this(msg);
022            this.cause = cause;
023        }
024    
025        @Override
026        public Throwable getCause() {
027            return cause;
028        }
029    }
030    // Copyright (c) Naked Objects Group Ltd.