mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-14 23:56:07 +09:00
added sources for Slick
Former-commit-id: 1647fa32ef6894bd7db44f741f07c2f4dcdf9054 Former-commit-id: 0e5810dcfbe1fd59b13e7cabe9f1e93c5542da2d
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
package org.newdawn.slick.opengl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* A collection of IOException that failed image data loading
|
||||
*
|
||||
* @author kevin
|
||||
*/
|
||||
public class CompositeIOException extends IOException {
|
||||
/** The list of exceptions causing this one */
|
||||
private ArrayList exceptions = new ArrayList();
|
||||
|
||||
/**
|
||||
* Create a new composite IO Exception
|
||||
*/
|
||||
public CompositeIOException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an exception that caused this exceptino
|
||||
*
|
||||
* @param e The exception
|
||||
*/
|
||||
public void addException(Exception e) {
|
||||
exceptions.add(e);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.lang.Throwable#getMessage()
|
||||
*/
|
||||
public String getMessage() {
|
||||
String msg = "Composite Exception: \n";
|
||||
for (int i=0;i<exceptions.size();i++) {
|
||||
msg += "\t"+((IOException) exceptions.get(i)).getMessage()+"\n";
|
||||
}
|
||||
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user