Closed aranega closed 4 months ago
Hi @aranega thanks for noting this. For now we don't have any netpyne-specific expection types, so I'm just throwing a default exception if load_file return zero code: https://github.com/suny-downstate-medical-center/netpyne/commit/a7c06ec8f760d8ea136ef950d2d66e1f024df394
Currently, the
importCellParams
method uses theimportCell
function which loads.hoc
file using theload_file
function from NEURON. Theload_file
function returns0
when an error occured (file not found, or an interpreter error while loading the file), but doesn't trigger any exception. In case theload_file
fails, there is no way of knowing that an error happened. It would be interesting to get the error code and to raise a dedicated exception in case the function fails. That would let nepyne users the possibility to implement their own error handling :)