Bishnupriya, Stuart,
Below is a transcript of an email thread of an issue you raised long ago.
Do you want any changes made to the LRM at this point?
-------
8.3 Page 390, very bottom. SC_DEFAULT_ERROR_ACTIONS needs SC_DISPLAY
added in. This is a bug also in the current 2.1v1 simulator -- it needs to
be added into sc_report.h.
I've toyed with this before, its not exactly a bug, although apparently
thats how it appears. SC_DEFAULT_ERROR_ACTIONS has SC_THROW in it and the
error message is embedded in the exception thrown. The practice is to
catch the exception and at that point print out the message
catch( const sc_report& ex ) {
cout << "\n" << ex.what() << "\n";
}
This is how the kernel always handles errors and the user too. It is not
entirely unreasonable because a catch block HAS to be there for the
program to not crash, and at that point printing out the message seems ok.
Should LRM obligate ALL handlers that catch sc_reports to do a Display
(both implementation and those in application ?) And if so shouldn't there
be a way to insure that SC_DISPLAY action and
sc_report_handler::handler_func is actually performed, not just stream to
cout?
Should LRM explicitly recommend that SC_THROW and SC_DISPLAY are never
used together? Should it recommend that SC_THROW is used in isolation and
that everything else (eg SC_LOG, SC_DISPLAY is handled by code catching
the report ? )
-------
Thanks,
John A
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Thu Nov 25 01:10:14 2010
This archive was generated by hypermail 2.1.8 : Thu Nov 25 2010 - 01:10:24 PST