You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, there is now @throws in the PHPDoc for the autoPagingIterator() method. This method makes calls to nextPage() and previousPage() which subsequently both call all() which throws ApiErrorException.
This should be added to all of the parent methods to hint when there is an unhandled exception point in IDEs. Right now, when I wrap an autoPagingIterator() loop in a try { } catch() {} block, there is nothing hinting to the IDE that exceptions can be thrown there.
To Reproduce
Use code snippet below with an IDE with decent PHP language support.
Expected behavior
IDE to complain when there is an unhandled exception.
Code snippets
try {
foreach ($balanceTransactions->autoPagingIterator() as$balanceTransaction) {
// Do work
}
} catch (RateLimitException|ApiErrorException$exception) {
// IDE thinks this is unreachable/not thrown in anything above.
}
OS
macOS
PHP version
PHP8.3
Library version
13.17.0
API version
2023-10-16
Additional context
Using PhpStorm 2024.1
The text was updated successfully, but these errors were encountered:
Describe the bug
Right now, there is now
@throws
in the PHPDoc for theautoPagingIterator()
method. This method makes calls tonextPage()
andpreviousPage()
which subsequently both callall()
which throwsApiErrorException
.This should be added to all of the parent methods to hint when there is an unhandled exception point in IDEs. Right now, when I wrap an
autoPagingIterator()
loop in atry { } catch() {}
block, there is nothing hinting to the IDE that exceptions can be thrown there.To Reproduce
Use code snippet below with an IDE with decent PHP language support.
Expected behavior
IDE to complain when there is an unhandled exception.
Code snippets
OS
macOS
PHP version
PHP8.3
Library version
13.17.0
API version
2023-10-16
Additional context
Using PhpStorm 2024.1
The text was updated successfully, but these errors were encountered: