MagicStack / MagicStack/asyncpg
Document exceptions
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 8.1k
- Forks
- 469
- Ø Merge
- 18 Min.
- Gemergte PRs (30 T.)
- 4
Beschreibung
Please add the asyncpg exceptions to the documentation. I have no trouble reading source code, so was pleasantly surprised to find how rich the included exception classes are.
>>> exceptions = sorted((o for o in vars(asyncpg).values() if isinstance(o, type) and issubclass(o, Exception)), key=lambda o: o.__name__)
>>> for exc in exceptions:
... if getattr(exc, 'sqlstate', None): continue # looong list otherwise
... print(exc.__name__)
... if exc.__doc__: print(exc.__doc__)
... print()
...
FatalPostgresError
A fatal error that should result in server disconnection.
InterfaceError
An error caused by improper use of asyncpg API.
InterfaceWarning
A warning caused by an improper use of asyncpg API.
InternalClientError
All unexpected errors not classified otherwise.
OutdatedSchemaCacheError
A value decoding error caused by a schema change before row fetching.
PostgresError
Base class for all Postgres errors.
ProtocolError
Unexpected condition in the handling of PostgreSQL protocol input.
UnknownPostgresError
An error with an unknown SQLSTATE code.
>>> # generated exceptions for all possible sqlstate values
...
>>> sum(1 for exc in exceptions if getattr(exc, 'sqlstate', None))
240
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit den asyncpg-Ausnahmeklassen und der im Issue gezeigten Ausnahmeliste, wobei die Basis- und API-Ausnahmen von den durch SQLSTATE erzeugten Ausnahmen getrennt werden. Dokumentiere die verfügbaren Klassen und ihre Beschreibungen einschließlich der SQLSTATE-Abdeckung; abgeschlossen ist die Aufgabe, wenn die Ausnahmereferenz in der Projektdokumentation abgedeckt ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- postgresql, python
- Bereich
- databases, documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100