[ET Trac] [Einstein Toolkit] #1455: CCTK_InterpGridArrays should give an error if an input variable index is -1
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Tue Oct 15 13:35:05 CDT 2013
#1455: CCTK_InterpGridArrays should give an error if an input variable index is -1
----------------------+-----------------------------------------------------
Reporter: hinder | Owner:
Type: defect | Status: closed
Priority: minor | Milestone:
Component: Cactus | Version: development version
Resolution: invalid | Keywords:
----------------------+-----------------------------------------------------
Changes (by hinder):
* status: new => closed
* resolution: => invalid
Comment:
I guess it was a mistake to use the same integer (-1) both as a return
error code, and a code to mean "no variable" in the interpolator
interface. Is there anything we can do to avoid people getting caught by
this? Obviously the return value of CCTK_VarIndex should have been
checked, but people don't always do this. If this is part of the
documented API of both functions, and we don't want to change that, I
guess we're stuck. Maybe in future we design a C++ API which has a more
friendly error-reporting method than return values, such as exceptions.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1455#comment:2>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list