Skip to content
Snippets Groups Projects
Commit 0de0436e authored by Ere Maijala's avatar Ere Maijala
Browse files

Pass Auth exceptions through on login so that custom error messages can be displayed.

parent 9712987f
No related merge requests found
...@@ -113,6 +113,9 @@ class ILS extends AbstractBase ...@@ -113,6 +113,9 @@ class ILS extends AbstractBase
// Connect to catalog: // Connect to catalog:
try { try {
$patron = $this->getCatalog()->patronLogin($username, $password); $patron = $this->getCatalog()->patronLogin($username, $password);
} catch (AuthException $e) {
// Pass Auth exceptions through
throw $e;
} catch (\Exception $e) { } catch (\Exception $e) {
throw new AuthException('authentication_error_technical'); throw new AuthException('authentication_error_technical');
} }
......
...@@ -71,6 +71,9 @@ class MultiILS extends ILS ...@@ -71,6 +71,9 @@ class MultiILS extends ILS
// Connect to catalog: // Connect to catalog:
try { try {
$patron = $this->getCatalog()->patronLogin($username, $password); $patron = $this->getCatalog()->patronLogin($username, $password);
} catch (AuthException $e) {
// Pass Auth exceptions through
throw $e;
} catch (\Exception $e) { } catch (\Exception $e) {
throw new AuthException('authentication_error_technical'); throw new AuthException('authentication_error_technical');
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment