It seems that invalid file references in nrn_load_dll don't throw an error. Is this known/desired? It seems that if the user specifies a file that doesn't exist an error should be thrown ... Thoughts?
Thanks,
Jim
nrn_load_dll file
Re: nrn_load_dll file
The function returns 0 on failure, 1 on success.
Code: Select all
oc>nrn_load_dll("foo")
0
oc>nrn_load_dll("/home/hines/neuron/nrnmpi/share/nrn/demo/release/x86_64/.libs/
libnrnmech.so")
loading membrane mechanisms from /home/hines/neuron/nrnmpi/share/nrn/demo/release/x86_64/.libs/libnrnmech.so
Additional mechanisms from files
cabpump.mod cachan1.mod camchan.mod capump.mod invlfire.mod khhchan.mod mcna.mod nacaex.mod nachan.mod release.mod
1
oc>
Re: nrn_load_dll file
Ah, good to know. I had never thought about it but I guess that's why a lot of the function calls I make are constantly printing out ones. Perhaps I should be paying more attention to those occasional zeros and removing some of those curly brackets around my function calls! Although on a related note, I just looked at some of my code and the one zero I was currently receiving was from a chdir() call in which 0 is good and -1 is bad :/
I tend to prefer throwing errors as opposed to status codes but I realize that the code isn't going to change. Thanks for giving me something to think about!
I tend to prefer throwing errors as opposed to status codes but I realize that the code isn't going to change. Thanks for giving me something to think about!