Updating error raised and a sylte change.

This commit is contained in:
Patrick Shriwise 2019-03-15 09:31:59 -05:00
parent 7ad2c41375
commit 61ad86dba0
2 changed files with 4 additions and 3 deletions

View file

@ -31,7 +31,7 @@ class _Position(Structure):
elif idx == 2:
return self.z
else:
raise ValueError("{} index is invalid for _Position".format(idx))
raise IndexError("{} index is invalid for _Position".format(key))
def __setitem__(self, idx, val):
if idx == 0:
@ -41,7 +41,7 @@ class _Position(Structure):
elif idx == 2:
self.z = val
else:
raise ValueError("{} index is invalid for _Position".format(idx))
raise IndexError("{} index is invalid for _Position".format(idx))
def __repr__(self):
return "({}, {}, {})".format(self.x, self.y, self.z)

View file

@ -954,7 +954,8 @@ RGBColor random_color() {
return {int(prn()*255), int(prn()*255), int(prn()*255)};
}
extern "C" int openmc_id_map(const void* plot, int32_t* data_out) {
extern "C" int openmc_id_map(const void* plot, int32_t* data_out)
{
auto plt = reinterpret_cast<const PlotBase*>(plot);
if (!plt) {