for ( Throwable error : schemaManager.getErrors() )
{
if ( error instanceof LdapSchemaException )
{
LdapSchemaException ldapSchemaException = ( LdapSchemaException ) error;
SchemaObject source = ldapSchemaException.getSourceObject();
if ( source != null )
{
SchemaHandler schemaHandler = Activator.getDefault().getSchemaHandler();
if ( source instanceof AttributeType )
{
source = schemaHandler.getAttributeType( source.getOid() );
}
else if ( source instanceof LdapSyntax )
{
source = schemaHandler.getSyntax( source.getOid() );
}
else if ( source instanceof MatchingRule )
{
source = schemaHandler.getMatchingRule( source.getOid() );
}
else if ( source instanceof ObjectClass )
{
source = schemaHandler.getObjectClass( source.getOid() );
}
errorsMap.put( source, ldapSchemaException );
}
}