|Anonymous | Login | Signup for a new account||2020-08-06 09:54 EDT|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000191||JANA||Bug||public||2012-01-30 08:17||2012-03-27 10:21|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Summary||0000191: behavior when gPARMS is missing|
|Description||This from an email sent by Mauri on 1/3/2012:|
Just FYI, if jana doesn't find a gPARMS parameter, it will throw an exception with this message:
JANA >>Launching threads .
JANA >> Factory Call Stack
JANA >> BSTnoise
JANA >> JEventLoop:OneEvent -- line:495 JEventLoop.cc
JApplication.cc:963 EXCEPTION caught for thread 0xb0207000 : std::exception
I think it would be better to have an explicit msg stating that the parameter is missing?
|Tags||No tags attached.|
I believe this is occurs because the user is not catching the exception and it falls to the catch-rethrow mechanism built into JANA whenever JEventLoop::Get is called. The original exception is thrown from:
Whether a parameter not being present warrants an exception, an error message, or and error code is a design choice. I still believe the exception is the right way to go. However, this should be addressed with a configuration parameter to allow the user to change the behavior if they prefer a different choice.
|It turns out the exception mechanism inside GetParameter cannot be simply turned off since it is an integral part of the flow control for SetDefaultParameter. I have sent an e-mail to Mauri asking for clarification and proposing a GetParameterNE method (NE=No Exception) that would wrap the existing GetParameter method, but print an error rather than throw an exception.|
|The real issue here is that no message indicating that GetParameter was called specifying a non-existant parameter caused the crash. It appears that such a message is included in the exception thrown from GetParameter, but somehow did not make it to the screen in Mauri's error message (see original description).|
This was fixed in revision 941 and will appear in JANA 0.6.4.
The message sent with the exception is now printed first to guarantee the user sees it.
|2012-01-30 08:17||davidl||New Issue|
|2012-02-02 08:05||davidl||Note Added: 0000299|
|2012-02-02 08:05||davidl||Status||new => assigned|
|2012-02-02 08:05||davidl||Assigned To||=> davidl|
|2012-02-02 08:35||davidl||Note Added: 0000300|
|2012-02-06 14:19||davidl||Note Added: 0000303|
|2012-03-27 10:21||davidl||Note Added: 0000326|
|2012-03-27 10:21||davidl||Status||assigned => resolved|
|2012-03-27 10:21||davidl||Resolution||open => fixed|
|Copyright © 2000 - 2020 MantisBT Team|