import java.sql.SQLException;
import java.util.LinkedList;
+import org.cacert.gigi.localisation.Language;
+
public class GigiApiException extends Exception {
- SQLException e;
+ private SQLException e;
- LinkedList<String> messages = new LinkedList<>();
+ private LinkedList<String> messages = new LinkedList<>();
public GigiApiException(SQLException e) {
super(e);
return e == null && messages.size() == 0;
}
+ @Override
+ public String getMessage() {
+ if (messages.size() != 0) {
+ StringBuffer res = new StringBuffer();
+ for (String string : messages) {
+ res.append(string + "\n");
+ }
+ return res.toString();
+ }
+ return "";
+ }
+
}