diff options
author | Gabe Black <gabeblack@google.com> | 2018-10-03 16:17:50 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-16 00:49:44 +0000 |
commit | 8946c9d52fc2d789844586867d047be69651ddd6 (patch) | |
tree | c69ec75842f42cacfe8fe7570e6aa000763aa17e /src/base/pixel.cc | |
parent | d45caee43e10c50d837aadc56b385f6340366cae (diff) | |
download | gem5-8946c9d52fc2d789844586867d047be69651ddd6.tar.xz |
systemc: Change how errors are handled in some constructors slightly.
Because SC_REPORT_ERROR usually causes an exception to be thrown, it's
easy to assume it will be the last thing executed in a function. It
might, however, be set up to do nothing, in which case the function
will continue to execute.
This change makes sure sc_prim will be set up properly even if errors
about the time a channel can be set up are ignored.
Also, if an exception is thrown while sc_port is being set up, the
corresponding Port object needs to be cleaned up. Rather than try to
intercept exceptions in the constructor and clean up properly, we'll
just make the allocation of the Port object be the last thing it does.
If the function exits early, then the Port pointer will still be
nullptr and nothing will need to be done.
Change-Id: If8f6f6b7e6830235fee3cd75625240b99e87dfbe
Reviewed-on: https://gem5-review.googlesource.com/c/13289
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/base/pixel.cc')
0 files changed, 0 insertions, 0 deletions