🚑 fix(ldap) Improve error handling

Errors may happen while iterating on the results, so store the error
 number and provide a way to check iteration went fine.

issue #1
2 jobs for 1-import-library-from-schema2ldif in 44 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Lint
passed create_php_lint_rapport_stretch #44624

00:00:10

 
  Codestyle
passed create_php_code_sniffer_rapport #44625

00:00:34