All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.artemis.ArtemisMultiException Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
package com.artemis;

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

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

	public List 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();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy