Skip to content
Snippets Groups Projects
Commit 41e1a7d8 authored by Nelson Tavares de Sousa's avatar Nelson Tavares de Sousa
Browse files

enhanched classes

parent b4caff33
No related branches found
No related tags found
No related merge requests found
......@@ -12,12 +12,18 @@ public class StageException extends Exception {
private static final long serialVersionUID = 6724637605943897808L;
private final Stage throwingStage;
private final Exception originalException;
public StageException(final Stage throwingStage) {
public StageException(final Exception e, final Stage throwingStage) {
super();
this.originalException = e;
this.throwingStage = throwingStage;
}
public Exception getOriginalException() {
return originalException;
}
/**
* Returns the stage, which failed with an uncatched exception
*
......
package teetime.framework;
/**
* Represent a minimalistic StageExceptionListener. Listener which extend from this one, must a least implement this functionality.
*
*/
public abstract class StageExceptionListener {
private final Thread thread;
......@@ -8,6 +12,23 @@ public abstract class StageExceptionListener {
this.thread = thread;
}
public abstract void onStageException(Stage throwingStage);
/**
* This method will be executed if an exception arises.
*
* @param e
* thrown exception
* @param throwingStage
* the stage, which has thrown the exception.
*/
public abstract void onStageException(Exception e, Stage throwingStage);
/**
* Retrieves the thread in which the exception occurred.
*
* @return exception throwing thread
*/
public Thread getThread() {
return thread;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment