package com.artemis;

import java.util.ArrayList;
import java.util.List;

@SuppressWarnings("serial")
public class ArtemisMultiException extends RuntimeException {
	private final List<Throwable> exceptions = new ArrayList<Throwable>();
	
	public ArtemisMultiException(List<Throwable> exceptions) {
		super();
		this.exceptions.addAll(exceptions);
	}

	public List<Throwable> getExceptions() {
		return exceptions;
	}
	
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		for (Throwable t : exceptions) {
			if (sb.length() > 0) sb.append("\n");
			sb.append(t.getMessage());
		}
		return sb.toString();
	}
}

package com.artemis;

import java.util.ArrayList;
import java.util.List;

@SuppressWarnings("serial")
public class ArtemisMultiException extends RuntimeException {
	private final List<Throwable> exceptions = new ArrayList<Throwable>();

	/** required constructor for serialization */
	public ArtemisMultiException() {}

	public ArtemisMultiException(List<Throwable> exceptions) {
		super();
		this.exceptions.addAll(exceptions);
	}

	public List<Throwable> getExceptions() {
		return exceptions;
	}
	
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		for (Throwable t : exceptions) {
			if (sb.length() > 0) sb.append("\n");
			sb.append(t.getMessage());
		}
		return sb.toString();
	}
}

fix #520: add no args ctor to ArtemisMultiException