Skip to content

Commit

Permalink
fix: exit code if not present
Browse files Browse the repository at this point in the history
  • Loading branch information
klopfdreh committed Jul 17, 2023
1 parent 195d136 commit 7779811
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class UnexpectedTaskExecutionException extends UnexpectedJobExecutionExce
/**
* The recorded exit code for the task.
*/
private Integer exitCode;
private Integer exitCode = -1;

/**
* User defined name for the task.
Expand Down Expand Up @@ -154,6 +154,12 @@ public long getExecutionId() {
return this.executionId;
}

/**
* Returns the exit code of the task.
*
* @return the exit code or -1 if the exit code couldn't be determined
*/
@Override
public int getExitCode() {
return this.exitCode;
}
Expand Down

0 comments on commit 7779811

Please sign in to comment.