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

Missing some exceptions #15

Closed
jgaskins opened this issue Feb 21, 2014 · 5 comments
Closed

Missing some exceptions #15

jgaskins opened this issue Feb 21, 2014 · 5 comments

Comments

@jgaskins
Copy link

Trying to add JRuby support to Perpetuity::Postgres. The good news is that almost 200 of the 214 specs pass. About 6 of the failures are due to a JRuby bug but the rest are due to missing exceptions:

  • PG::ConnectionBad: I'm assuming this is a generic "we couldn't connect" exception, but I'm seeing it raised if the specified database doesn't exist.
  • PG::UndefinedFunction: If you use a SQL function that isn't loaded or doesn't exist.
  • PG::UndefinedTable: CRUD on a nonexistent table.
  • PG::UndefinedColumn: Raised any time Postgres says column "foo" does not exist.

I think those are the only exceptions I'm missing in Perpetuity::Postgres. I'll update if I notice more.

@tmornini
Copy link

tmornini commented May 6, 2014

Bump! I have an actual failure on CI due to PG::ConnectionBad not being defined by jruby-pg. :-)

@jvshahid
Copy link
Collaborator

jvshahid commented May 7, 2014

@tmornini there's a pr to merge jruby-pg with ruby-pg, the pr has all the missing exceptions defined. Can you test with the pr, i.e. build from git ? The pr is ged/ruby-pg#1

@tmornini
Copy link

tmornini commented May 8, 2014

@jvshahid I'd be happy to, but I don't know how to reference the pull request in my Gemfile.

Looked around and saw nothing, have a sneaking suspicion that I'm missing something obvious. :-)

P.S. Very cool to merge this into ruby-pg

@jvshahid
Copy link
Collaborator

jvshahid commented May 8, 2014

I think you should be able to do this in your Gemfile (i havent' tried it though):

gem 'pg', :github => 'jvshahid:jruby-pg', :branch => 'jruby-pg'

@jvshahid
Copy link
Collaborator

This should be fixed on master. I think I got all the exceptions, at least the ones mentioned here. I'm planning to release this gem very soon. I'll post something on the jruby mailing list when the gem is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants