MantisBT - JANA
View Issue Details
0000267JANAFeature Requestpublic2012-07-09 09:522012-07-15 20:49
davidl 
davidl 
normalminoralways
resolvedfixed 
0000267: Give better error message when input source does not exits
JANA exits with an ugly and cryptic error message when there is no valid input. This can be because the user forgot to add a source to the command line, or that the given source does not exist.

Currently, the exception (buried in a sea of other messages) is:

JEvent::GetObjects called when source is NULL

This should never happen since a NULL source should be detected earlier and GetObjects never called.
No tags attached.
Issue History
2012-07-09 09:52davidlNew Issue
2012-07-15 20:49davidlNote Added: 0000397
2012-07-15 20:49davidlStatusnew => resolved
2012-07-15 20:49davidlResolutionopen => fixed
2012-07-15 20:49davidlAssigned To => davidl

Notes
(0000397)
davidl   
2012-07-15 20:49   
Changes committed in revision 997. The number of specified sources is now checked in the Run method so if zero are specified, then an error is printed and the program exits immediately.

Additional checks are no done in OpenNext as well to print a message and exit quicker of none of the specified event sources could be opened.

I did not reproduce the error exactly as described so it's possible this won't work in all cases. I did, however test it for both these cases and it works as expected (on Mac OS X 10.7).