mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-16 00:58:02 -05:00
Throw an exception when reading an unexpected LDIF record type
This commit is contained in:
parent
e6102ec99e
commit
ad93ab595c
1 changed files with 3 additions and 2 deletions
|
|
@ -179,11 +179,12 @@ int LdifReader::readNextRecord( bool first )
|
|||
|
||||
LDAPEntry LdifReader::getEntryRecord()
|
||||
{
|
||||
std::list<stringpair>::const_iterator i = m_currentRecord.begin();
|
||||
if ( m_curRecType != LDAPMsg::SEARCH_ENTRY )
|
||||
{
|
||||
// Error
|
||||
throw( std::runtime_error( "The LDIF record: '" + i->second +
|
||||
"' is not a valid LDAP Entry" ));
|
||||
}
|
||||
std::list<stringpair>::const_iterator i = m_currentRecord.begin();
|
||||
LDAPEntry resEntry(i->second);
|
||||
i++;
|
||||
LDAPAttribute curAttr(i->first);
|
||||
|
|
|
|||
Loading…
Reference in a new issue