Re: Uh-oh! Driver-specific exceptions are not abstracted....
Jacob Smullyan <[email protected]> Tue, 16 Aug 2005 11:49:28 -0400
| Newsgroups | gmane.comp.web.skunkweb |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Aug 16, 2005 at 08:26:34AM -0700, Matthew Bogosian wrote:
> So, just to clarify, one would do something like this:
>
> db = pydo.dbi.getConnection('alias_name')
> globals.update(db.exceptions)
>
> That way, one could then do something like:
>
> try:
> MyTableClass.new(...)
> except IntegrityError:
> ...
>
> Is that right?
Yes, that's the idea.
> That does seem much easier to implement for PyDO (I apologize for my
> ignorance of the standard DB API exceptions), but please don't feel
> like you need to hastily pollute your objects' namespaces for my
> request (unless you believe the additions are the appropriate ones).
Not at all, it isn't in the way and it is clearly useful, and easy.
--
Jacob Smullyan
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDAgsIuqamFyFXXLIRAitTAJ4lM0JiPsMkK9e7iFMxTj/99hpj4QCgjSdm BZKGQ7QiNKXQj5EgD76fgTE= =HEZj -----END PGP SIGNATURE-----