0

When I get an exception while running the below code, it does not return the exception message but loads Laravel’s error handling page. I’m trying to return the exception error message.

            try {
                $adldap = new adLDAP(Config::get('app.ldap'));
            }
            catch (adLDAPException $e) {
                return $e; 
            }

Laravel handling the exception

AlGallaf
  • 627
  • 6
  • 15
  • 28
  • 2
    According to the error you're receiving you should be catching an `\adLDAP\adLDAPException` (notice the full namespace there). – Bogdan Jul 08 '15 at 07:55

1 Answers1

0

I just encountered this issue and discovered that AdLDAP 5.0.0 onwards requires you to use 'adLDAP\Exceptions\adLDAPException'.

Rob Ganly

Rob Ganly
  • 403
  • 2
  • 5
  • 14