summaryrefslogtreecommitdiff
path: root/src/systemc/ext
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemc/ext')
-rw-r--r--src/systemc/ext/core/sc_process_handle.hh8
-rw-r--r--src/systemc/ext/utils/sc_report.hh2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/systemc/ext/core/sc_process_handle.hh b/src/systemc/ext/core/sc_process_handle.hh
index 04df4728f..b9bb9a0c4 100644
--- a/src/systemc/ext/core/sc_process_handle.hh
+++ b/src/systemc/ext/core/sc_process_handle.hh
@@ -33,7 +33,8 @@
#include <exception>
#include <vector>
-#include "systemc/ext/core/sc_object.hh"
+#include "../utils/sc_report_handler.hh"
+#include "sc_object.hh"
namespace sc_gem5
{
@@ -212,6 +213,11 @@ class sc_process_handle
sc_descendent_inclusion_info include_descendants=
SC_NO_DESCENDANTS)
{
+ if (!_gem5_process) {
+ SC_REPORT_WARNING("(W570) attempt to use an empty "
+ "process handle ignored", "throw_it()");
+ return;
+ }
::sc_gem5::ExceptionWrapper<T> exc(user_defined_exception);
::sc_gem5::throw_it_wrapper(_gem5_process, exc,
include_descendants == SC_INCLUDE_DESCENDANTS);
diff --git a/src/systemc/ext/utils/sc_report.hh b/src/systemc/ext/utils/sc_report.hh
index 6f652ce2c..19029ec55 100644
--- a/src/systemc/ext/utils/sc_report.hh
+++ b/src/systemc/ext/utils/sc_report.hh
@@ -33,7 +33,7 @@
#include <exception>
#include <string>
-#include "systemc/ext/core/sc_time.hh"
+#include "../core/sc_time.hh"
namespace sc_core
{