Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TeeTime-Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nelson Tavares de Sousa
TeeTime-Framework
Commits
843c3511
Commit
843c3511
authored
10 years ago
by
Nelson Tavares de Sousa
Browse files
Options
Downloads
Patches
Plain Diff
instead of passing a instance -> pass a StageExceptionHandler Class
(type check possible)
parent
7ed565b4
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/teetime/framework/Analysis.java
+6
-6
6 additions, 6 deletions
src/main/java/teetime/framework/Analysis.java
src/test/java/teetime/framework/ExceptionHandling.java
+2
-2
2 additions, 2 deletions
src/test/java/teetime/framework/ExceptionHandling.java
with
8 additions
and
8 deletions
src/main/java/teetime/framework/Analysis.java
+
6
−
6
View file @
843c3511
...
...
@@ -28,7 +28,7 @@ public class Analysis implements UncaughtExceptionHandler {
private
final
AnalysisConfiguration
configuration
;
private
final
StageExceptionHandler
listener
;
private
final
Class
<?
extends
teetime
.
framework
.
exceptionHandling
.
StageExceptionHandler
>
listener
;
private
boolean
executionInterrupted
=
false
;
...
...
@@ -47,11 +47,11 @@ public class Analysis implements UncaughtExceptionHandler {
* to be used for the analysis
*/
public
Analysis
(
final
AnalysisConfiguration
configuration
)
{
this
(
configuration
,
false
,
new
IgnoringStageListener
()
);
this
(
configuration
,
false
,
IgnoringStageListener
.
class
);
}
public
Analysis
(
final
AnalysisConfiguration
configuration
,
final
boolean
validationEnabled
)
{
this
(
configuration
,
validationEnabled
,
new
IgnoringStageListener
()
);
this
(
configuration
,
validationEnabled
,
IgnoringStageListener
.
class
);
}
/**
...
...
@@ -62,11 +62,11 @@ public class Analysis implements UncaughtExceptionHandler {
* @param listener
* specific listener for the exception handling
*/
public
Analysis
(
final
AnalysisConfiguration
configuration
,
final
StageExceptionHandler
listener
)
{
public
Analysis
(
final
AnalysisConfiguration
configuration
,
final
Class
<?
extends
StageExceptionHandler
>
listener
)
{
this
(
configuration
,
false
,
listener
);
}
public
Analysis
(
final
AnalysisConfiguration
configuration
,
final
boolean
validationEnabled
,
final
StageExceptionHandler
listener
)
{
public
Analysis
(
final
AnalysisConfiguration
configuration
,
final
boolean
validationEnabled
,
final
Class
<?
extends
StageExceptionHandler
>
listener
)
{
this
.
configuration
=
configuration
;
this
.
listener
=
listener
;
if
(
validationEnabled
)
{
...
...
@@ -106,7 +106,7 @@ public class Analysis implements UncaughtExceptionHandler {
for
(
Stage
stage
:
threadableStageJobs
)
{
StageExceptionHandler
newListener
;
try
{
newListener
=
listener
.
getClass
().
newInstance
();
newListener
=
listener
.
newInstance
();
}
catch
(
InstantiationException
e
)
{
throw
new
IllegalStateException
(
e
);
}
catch
(
IllegalAccessException
e
)
{
...
...
This diff is collapsed.
Click to expand it.
src/test/java/teetime/framework/ExceptionHandling.java
+
2
−
2
View file @
843c3511
...
...
@@ -10,12 +10,12 @@ import teetime.framework.exceptionHandling.TestListener;
public
class
ExceptionHandling
{
TestListener
listener
;
Class
<
TestListener
>
listener
;
Analysis
analysis
;
@Before
public
void
newInstances
()
{
listener
=
new
TestListener
()
;
listener
=
TestListener
.
class
;
analysis
=
new
Analysis
(
new
ExceptionTestConfiguration
(),
listener
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment