Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for mediawiki-api-base throwing TypeError instead of Exception #9

Merged
merged 1 commit into from
Oct 25, 2024
Merged
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
6 changes: 3 additions & 3 deletions src/RemoteWiki.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
use Addwiki\Mediawiki\Api\Client\Auth\UserAndPassword;
use Addwiki\Mediawiki\Api\Client\MediaWiki;
use Config;
use Exception;
use LogicException;
use Parser;
use Throwable;
use WANObjectCache;

/**
Expand Down Expand Up @@ -163,7 +163,7 @@ private function getGenerator( MediaWiki $api ): ?string {
}
$this->cache->set( $reqKey, $version, $cacheTTL );
return $version;
} catch ( Exception $e ) {
} catch ( Throwable $e ) {
return $this->config->get('RemoteWikiVerbose') ? $e->getMessage() : '';
}
}
Expand Down Expand Up @@ -352,7 +352,7 @@ private function getExtensionsData( MediaWiki $api ) {
}
$this->cache->set( $reqKey, $extensions, $cacheTTL );
return $extensions;
} catch ( Exception $e ) {
} catch ( Throwable $e ) {
return [];
}
}
Expand Down
Loading