summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorStephan Diestelhorst <stephan.diestelhorst@arm.com>2014-03-07 15:56:23 -0500
committerStephan Diestelhorst <stephan.diestelhorst@arm.com>2014-03-07 15:56:23 -0500
commit45677ffa97e44816881b9ec636d11798eb100fcb (patch)
tree1efa017279b6c5acc5b1abd87d03d2d0ab66830c /src/python
parentb9a9d99b226768dc972f0c40488f332066396e69 (diff)
downloadgem5-45677ffa97e44816881b9ec636d11798eb100fcb.tar.xz
misc: Add panic_if / fatal_if / chatty_assert
This snippet can be used to replace if + {panics, fatals, asserts} constructs. The idea is to have both the condition checking and a verbose printout in a single statement. The interface is as follows: panic_if(foo != bar, "These should be equal: foo %i bar %i", foo, bar); fatal_if(foo != bar, "These should be equal: foo %i bar %i", foo, bar); chatty_assert(foo == bar, "These should be equal: foo %i bar %i", foo, bar);
Diffstat (limited to 'src/python')
0 files changed, 0 insertions, 0 deletions