Skip to content

Commit

Permalink
Added a HostError class (as SimGrid is thorwing more exceptions!)
Browse files Browse the repository at this point in the history
Still need to write tests for it
  • Loading branch information
henricasanova committed Feb 12, 2019
1 parent 49ed38d commit 2da1e52
Show file tree
Hide file tree
Showing 6 changed files with 221 additions and 168 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Expand Up @@ -228,8 +228,8 @@ set(TEST_FILES
test/main.cpp
test/include/TestWithFork.h
test/include/UniqueTmpPathPrefix.h
test/simulation_message_constructors/MessageConstructorTest.cpp
test/failure_cause_constructor/FailureCauseConstructorTest.cpp
test/constructors/simulation_message_constructors/MessageConstructorTest.cpp
test/constructors/failure_cause_constructor/FailureCauseConstructorTest.cpp
test/workflow/WorkflowTest.cpp
test/workflow/WorkflowFileTest.cpp
test/workflow/WorkflowTaskTest.cpp
Expand Down
23 changes: 22 additions & 1 deletion include/wrench/workflow/execution_events/FailureCause.h
Expand Up @@ -73,7 +73,9 @@ namespace wrench {
/** @brief A functionality is not available */
FUNCTIONALITY_NOT_AVAILABLE,
/** @brief A job was terminated due to a timeout */
JOB_TIMEOUT
JOB_TIMEOUT,
/** @brief The host went down (while computing, while sleeping) **/
HOST_ERROR

};

Expand Down Expand Up @@ -384,6 +386,25 @@ namespace wrench {
std::string mailbox = "";
};

/**
* @brief A "host error" failure cause
*/
class HostError : public FailureCause {
public:

/***********************/
/** \cond INTERNAL */
/***********************/
HostError();
/***********************/
/** \endcond */
/***********************/

std::string toString();

private:
};


/**
* @brief A "job cannot be terminated" failure cause
Expand Down

0 comments on commit 2da1e52

Please sign in to comment.