diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 7ca35aac704dbc8c86577ed4ea1c7f7a1ae8cf9c..cb6f4802d08fb3e597e95516a17801fc159e00d0 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -5,12 +5,18 @@ <title>Release notes</title> </properties> <body> - <release version="Snapshot" date="Daily basis" description="Unstable preview of oncoming versions"> - <action dev="ntd" type="add" issue="66"> - Created a new site to promote TeeTime. + <release version="Snapshot" date="Daily basis" + description="Unstable preview of oncoming versions"> + <action dev="ntd" type="add" issue="32"> + Introduced a generic exception handling for stages. </action> + </release> <release version="1.0" date="Soon" description="Initial release"> + <action dev="ntd" type="add" issue="66"> + Created a new site to + promote TeeTime. + </action> <action type="add"> Initial release of TeeTime </action> diff --git a/src/main/java/teetime/framework/StageException.java b/src/main/java/teetime/framework/StageException.java new file mode 100644 index 0000000000000000000000000000000000000000..c1a6a8da63da74e00cc1524f1e058ca599116b0b --- /dev/null +++ b/src/main/java/teetime/framework/StageException.java @@ -0,0 +1,30 @@ +package teetime.framework; + +/** + * Represents an Exception, which is thrown by stages, if uncatched exceptions are thrown. + * + */ +public class StageException extends Exception { + + /** + * Generated UID + */ + private static final long serialVersionUID = 6724637605943897808L; + + private final Stage throwingStage; + + public StageException(final Stage throwingStage) { + super(); + this.throwingStage = throwingStage; + } + + /** + * Returns the stage, which failed with an uncatched exception + * + * @return stage instance, which throws the exception + */ + public Stage getThrowingStage() { + return throwingStage; + } + +}