View Javadoc
1   package de.fhdw.wtf.persistence.exception;
2   
3   /**
4    * A class to represent a persistence Exception wrapped into a Runtime exception to provide an ease of use when
5    * interacting with the persistence layer at runtime.
6    * 
7    */
8   public class RuntimePersistenceException extends RuntimeException {
9   	/**
10  	 * the message of the exception.
11  	 */
12  	private static final String MESSAGE = "A Problem occured during accessing the database";
13  	/**
14  	 * 
15  	 */
16  	private static final long serialVersionUID = 1L;
17  	
18  	/**
19  	 * Constructor for a default RuntimePersistenceException.
20  	 */
21  	public RuntimePersistenceException() {
22  		super(MESSAGE);
23  	}
24  	
25  	/**
26  	 * Constructor for a RuntimePersistenceException, with possibility to append the causing Exception.
27  	 * 
28  	 * @param cause
29  	 *            A Throwable which caused this RuntimePersistenceException.
30  	 */
31  	public RuntimePersistenceException(final Throwable cause) {
32  		super(MESSAGE, cause);
33  	}
34  	
35  }