mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Updating error raised and a sylte change.
This commit is contained in:
parent
7ad2c41375
commit
61ad86dba0
2 changed files with 4 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue