Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Command/ImportCodesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ private function performImport(
} catch (\Throwable $e) {
// Check if this is a lock acquisition failure
if (str_contains($e->getMessage(), 'Failed to acquire database lock')) {
throw new CodeImportException("Import failed: " . $e->getMessage());
throw new CodeImportException("Import failed: " . $e->getMessage(), $e->getCode(), $e);
}
// Re-throw other exceptions as-is
throw $e;
Expand Down
2 changes: 2 additions & 0 deletions src/Config/ConfigAccessorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
*/

declare(strict_types=1);

namespace OpenCoreEMR\CLI\ImportCodes\Config;

interface ConfigAccessorInterface
Expand Down
2 changes: 2 additions & 0 deletions src/Config/GlobalsAccessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
*/

declare(strict_types=1);

namespace OpenCoreEMR\CLI\ImportCodes\Config;

class GlobalsAccessor implements ConfigAccessorInterface
Expand Down
6 changes: 5 additions & 1 deletion src/Service/OpenEMRConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ public function initialize(string $openemrPath, string $site = 'default'): void
throw new OpenEMRConnectorException("OpenEMR database functions not available");
}
} catch (\Throwable $e) {
throw new OpenEMRConnectorException("OpenEMR database connection test failed: " . $e->getMessage());
throw new OpenEMRConnectorException(
"OpenEMR database connection test failed: " . $e->getMessage(),
$e->getCode(),
$e
);
}

$this->initialized = true;
Expand Down