1 package de.fhdw.wtf.persistence.exception;
2
3 import java.sql.SQLException;
4
5
6
7
8
9
10 public abstract class PersistenceException extends Exception {
11
12
13
14
15 private final SQLException nestedException;
16
17
18
19
20 private static final long serialVersionUID = 1L;
21
22
23
24
25
26
27
28
29
30 protected PersistenceException(final String message, final SQLException nestedException) {
31 super(message);
32 this.nestedException = nestedException;
33 }
34
35 @Override
36 public void printStackTrace() {
37 super.printStackTrace();
38 if (this.nestedException != null) {
39 this.nestedException.printStackTrace();
40 }
41 }
42
43 }