]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Fix catching API exceptions
authorMarcin Haba <marcin.haba@bacula.pl>
Tue, 1 May 2018 19:25:27 +0000 (21:25 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Tue, 1 May 2018 19:25:27 +0000 (21:25 +0200)
gui/baculum/protected/API/Class/BaculumAPIServer.php
gui/baculum/protected/API/Class/Database.php

index 09686085642d772c3577986c4d3e0c6be40f008b..29c839c98c63065c75a5eb6e8dedb2ef78d63d5e 100644 (file)
@@ -162,7 +162,7 @@ abstract class BaculumAPIServer extends TPage {
                                        break;
                                }
                        }
-               } catch(TException $e) {
+               } catch(Prado\Exceptions\TException $e) {
                        $this->getModule('logging')->log(
                                __FUNCTION__,
                                "Method: {$_SERVER['REQUEST_METHOD']} $e",
index eea4cef3b027d2b3d233f931148b8dfdaa0296a1..8c7e1dbbb51d1597e11566e46530ad68194800c2 100644 (file)
@@ -53,7 +53,7 @@ class Database extends APIModule {
                        $connection->setActive(true);
                        $tables_format = $this->getTablesFormat($connection);
                        $is_connection = (is_numeric($tables_format) === true && $tables_format > 0);
-               } catch (TDbException $e) {
+               } catch (Prado\Exceptions\TDbException $e) {
                        throw new BCatalogException(
                                DatabaseError::MSG_ERROR_DB_CONNECTION_PROBLEM . ' ' . $e->getErrorMessage(),
                                DatabaseError::ERROR_DB_CONNECTION_PROBLEM