mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Access Journal::Stream using member functions (RIPD-1087):
Replace Journal public data members with member function accessors in order to make Journal lighter weight. The change makes a Journal cheaper to pass by value. Also add missing stream checks (e.g., calls to JLOG) to avoid text processing that ultimately will not be stored in the log.
This commit is contained in:
@@ -113,7 +113,7 @@ bool STObject::setType (const SOTemplate& type)
|
||||
{
|
||||
if ((e->flags == SOE_DEFAULT) && iter->get().isDefault())
|
||||
{
|
||||
JLOG (debugJournal().warning)
|
||||
JLOG (debugJournal().warn())
|
||||
<< "setType(" << getFName().getName()
|
||||
<< "): explicit default " << e->e_field.fieldName;
|
||||
valid = false;
|
||||
@@ -125,7 +125,7 @@ bool STObject::setType (const SOTemplate& type)
|
||||
{
|
||||
if (e->flags == SOE_REQUIRED)
|
||||
{
|
||||
JLOG (debugJournal().warning)
|
||||
JLOG (debugJournal().warn())
|
||||
<< "setType(" << getFName().getName()
|
||||
<< "): missing " << e->e_field.fieldName;
|
||||
valid = false;
|
||||
@@ -138,7 +138,7 @@ bool STObject::setType (const SOTemplate& type)
|
||||
// Anything left over in the object must be discardable
|
||||
if (! e->getFName().isDiscardable())
|
||||
{
|
||||
JLOG (debugJournal().warning)
|
||||
JLOG (debugJournal().warn())
|
||||
<< "setType(" << getFName().getName()
|
||||
<< "): non-discardable leftover " << e->getFName().getName ();
|
||||
valid = false;
|
||||
@@ -208,7 +208,7 @@ bool STObject::set (SerialIter& sit, int depth)
|
||||
|
||||
if ((type == STI_ARRAY) && (field == 1))
|
||||
{
|
||||
JLOG (debugJournal().warning)
|
||||
JLOG (debugJournal().warn())
|
||||
<< "Encountered object with end of array marker";
|
||||
Throw<std::runtime_error> ("Illegal terminator in object");
|
||||
}
|
||||
@@ -221,7 +221,7 @@ bool STObject::set (SerialIter& sit, int depth)
|
||||
|
||||
if (fn.isInvalid ())
|
||||
{
|
||||
JLOG (debugJournal().warning)
|
||||
JLOG (debugJournal().warn())
|
||||
<< "Unknown field: field_type=" << type
|
||||
<< ", field_name=" << field;
|
||||
Throw<std::runtime_error> ("Unknown field");
|
||||
|
||||
Reference in New Issue
Block a user