diff --git a/includes/CargoLuaLibrary.php b/includes/CargoLuaLibrary.php index 2674a0fa..4df35469 100644 --- a/includes/CargoLuaLibrary.php +++ b/includes/CargoLuaLibrary.php @@ -48,6 +48,8 @@ public function cargoQuery( $tables, $fields, $args ): array { $query = CargoSQLQuery::newFromValues( $tables, $fields, $where, $join, $groupBy, $having, $orderBy, $limit, $offset ); $rows = $query->run(); + } catch ( \Wikimedia\Rdbms\DBError $e ) { + throw $e; } catch ( Exception $e ) { // Allow for error handling within Lua. throw new Scribunto_LuaError( $e->getMessage() ); diff --git a/includes/parserfunctions/CargoQuery.php b/includes/parserfunctions/CargoQuery.php index e267db35..a1ac2b55 100644 --- a/includes/parserfunctions/CargoQuery.php +++ b/includes/parserfunctions/CargoQuery.php @@ -114,6 +114,8 @@ public static function run( $parser ) { ); $queryResultsJustForResultsTitle = $sqlQueryJustForResultsTitle->run(); } + } catch ( \Wikimedia\Rdbms\DBError $e ) { + throw $e; } catch ( Exception $e ) { return CargoUtils::formatError( $e->getMessage() ); }